I'm not sure if this will help you. If all your looking to do is save the connection information, finder will solve that problem. http://support.apple.com/kb/TA22243
Just add it your list of favorite servers and it's point and click. The information appears to be outdated, but I'm sure the process is still similar.
I just checked and there is another way to mount NFS shares:
$cd /net/"ip or computer name"
and browse the shares.
You can easily write a script to do this for you. I can confirm that the above method does work, because I tested it in Lion, and I read about this technique in a book I think is based on Tiger/Leopard.
EDIT: Here is an output of my /etc/auto_master file
#
# Automounter master map
#
+auto_master # Use directory service
/net -hosts -nobrowse,hidefromfinder,nosuid
/home auto_home -nobrowse,hidefromfinder
/Network/Servers -fstab
/- -static
I'm guessing you would delete the last two lines according to the manual. [Disclaimer: I have never tried this]. Here is a link the auto_master documentation.
https://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man5/auto_master.5.html
EDIT: http://lowendmac.com/ed/winston/09kw/intro-to-autofs.html Here
it describes the last two entries
The last two lines in auto_master handle NFS mounts defined in the
/etc/fstab file, the common file system mount table in Linux and other
Unix flavors. The /etc/fstab file is deprecated in OS X and not
recommended.
I would try commenting them out one at a time and see if that helps
I've found that umount
-ing the share will also resolve the problem each time I suspend my VM.
It's not a perfect solution, as it has to be done manually, but it does work.
E.g.:
sudo umount /vhosts
- (suspend VM)
sudo automount -vc
I haven't tested whether step 3 is necessary, but I figure it couldn't hurt.
Best Answer
OK, what follows is an adapted version of a shell script that I have running on my local Macs to auto mount certain AFP volumes when I'm at home. You'll need to adjust the
mount_nfs
line, enter the MAC address for your home router, and adjust the volume name for the mount (if you want).I have this script triggered to run every 5 minutes via a launchd file in
~/Library/LaunchAgents
Code on Pastebin