MacOS X automount
Sure, Disk Utility.app
can be used to set up NFS mounts. But as long as automount(8) is supported in MacOS X, let's use this for a more general approach:
Create the mount points first, both for SMB and NFS:
$ mkdir /mnt/{nfs,smb}/{a,b}Then we create automount ''maps'' for each protocol:
$ cat /etc/auto_nfs /mnt/nfs/a -fstype=nfs,rw,resvport 10.0.0.10:/export/foo /mnt/nfs/b -fstype=nfs,ro,resvport 10.0.0.10:/export/bar $ cat /etc/auto_smb /mnt/smb/a -fstype=smbfs,rw ://10.0.0.10/foo /mnt/smb/b -fstype=smbfs,ro ://10.0.0.10/barWith that in place, we have to include both files in auto_master(5)
$ grep -v ^\# /etc/auto_master +auto_master # Use directory service /- auto_smb /- auto_nfsTell automountd(8) to flush any cached information:
$ automount -v -cSometimes it's necessary to restart automountd:
$ launchctl stop com.apple.automountd $ launchctl start com.apple.automountdNow the shares should be mounted automatically upon access.