Skip to content

Instantly share code, notes, and snippets.

@clburlison
Forked from channingwalton/AutomountMaverick.md
Created July 18, 2014 01:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clburlison/1a96e583bb851ec93f8b to your computer and use it in GitHub Desktop.
Save clburlison/1a96e583bb851ec93f8b to your computer and use it in GitHub Desktop.

What Changed

I used to automount on OSX by sudo vifs and adding a line like vault.local:/backup /Volumes/backup url auto,url==afp://;AUTH=No%20User%20Authent@vault.local/backup 0 0. But that no longer works on Maverick because the system deletes everything in /Volumes on wake/restart/something-or-other.

Fix with ControlPlane

Use this

The Fix Under-the-Hood

We are going to create a mount at /mnt/Resources. We need to edit the auto_master to tell it where the automount config for /mnt/Resources lives:

sudo vi /etc/auto_master

Now add this line at the top

 /mnt/Resources          auto_resources

Mine looks like this now:

#
# Automounter master map
#
/mnt/Resources          auto_resources
+auto_master            # Use directory service
/net                    -hosts          -nobrowse,hidefromfinder,nosuid
/home                   auto_home       -nobrowse,hidefromfinder
/Network/Servers        -fstab
/-                      -static

Now create auto_resources, which is what OSX will look for because you told it to in auto_master

sudo vi /etc/auto_resources

add lines for each mount you would like. I wanted a backup so I added:

backup afp://;AUTH=No%20User%20Authent@vault.local/backup

Restart the daemons of mounting:

sudo automount -vc

Now your mount will appear under /mnt/Resources.

See Also

  1. man automount
  2. a Helpful blog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment