MacOS X automount

Sure, Disk 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
 /mnt/nfs/b -fstype=nfs,ro,resvport
 $ cat /etc/auto_smb 
 /mnt/smb/a -fstype=smbfs,rw ://
 /mnt/smb/b -fstype=smbfs,ro ://
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
 $ launchctl start
Now the shares should be mounted automatically upon access.