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/bar
With 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_nfs
Tell automountd(8) to flush any cached information:
 $ automount -v -c
Sometimes it's necessary to restart automountd:
 $ launchctl stop  com.apple.automountd
 $ launchctl start com.apple.automountd
Now the shares should be mounted automatically upon access.