Automount a network drive

From AwkwardTV
Revision as of 06:46, 16 August 2007 by ProfessaFresh (talk | contribs)
Jump to: navigation, search

First, thanks to Azral !

The solution is to create a startupitem in /Library/StartupItems/

First of - create a catalog (in this case named "MountStuff" but a name of your choosing chould suffice - rename files/parameters if you change name) containing two files:

File MountStuff containing:

#!/bin/sh
/usr/sbin/shlight '//Storage/DISK 2' /Users/frontrow/Movies/disk -U pcguest -P pcguest 

File StartupParameters.plist containing:


{
  Description = "MountStuff";
  Provides = ("Mounts");
  Requires = ("Network");
  OrderPreference = "None";
}

Don't forget to sudo chmod +x MountStuff. (:

And thats about it! Now it mounts my share(s) on startup.