Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Sledgehammer?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Sledgehammer?
Authored by: babbage on Oct 10, '02 07:29:10PM
As effective as this strategy is -- very, I'm sure -- wouldn't it be easier to just throw a one line shell script under /Library/StartupItems and be done with it? The script doesn't have to be much more than a wrapper around the command mount -t nfs -o defaults server:/remote /local/mount/point See other files & directories for how exactly to set this up, but basically under the StartupItems directory you have a directory with the name of the service, and in that directory you have two files. One of the files is a brief script that launches the program (which has the same name as the directory) and the other is a startupparameters.plist file that sets a couple of simple variables. It's very easy to just copy one of the existing directories, change around a few lines, add an appropriate version of the mount command above, and go. It only takes a few seconds to set up once you figure it out.

[ Reply to This | # ]
RE: Sledgehammer?
Authored by: jhowk on Oct 11, '02 12:56:40AM

An old UN*X tip: Not necessarily easier per say, but since automount is installed and the daemon running by default, you could just put in your NFS mounts into the /etc/fstab.hd(?) Then once you actually attempt to visit that mount point, automount, well mounts it. man on automount for more info.



[ Reply to This | # ]
RE: Sledgehammer?
Authored by: Lone Macster on Oct 11, '02 12:56:37PM

The fstab option afforded me a serious hang during boot time if the server was down, or if NFS was not running. This seemed to be the best way to get teh results I wanted with the flexibility I required. the startup script idea seems doable, but I would have to run a umount, and then edit the script, and then run the script again to move a mountpoint.



[ Reply to This | # ]
Sledgehammer?
Authored by: Lone Macster on Oct 11, '02 12:52:02PM

This is true, but the idea I had was to be able to Dynamically mount the volumes. The startup script still requires a reboot to see the changes if I decide to move the mount point. I could run the script again, but I would have to change it anyway just like the Netinfo DB.



[ Reply to This | # ]