Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

schpongo

macrumors member
Original poster
Feb 21, 2011
48
0
I have a Nas and to make the experience using it more seamless I wanted a way to auto mount my shares after waking my laptop.
First I thought of using some kind of utility which allowed me to run a script on wake up, but then I found out that there is a built in utility for auto mounting drives called autofs.

So I looked at some tutorials and tried my luck but my results are inconsistent.
Sometimes the shares show up mounted sometimes not.

Here ist my 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
/Users/Anonymous/Nas auto_afp


In the same directory I put the auto_afp file:

HomeServer -fstype=afp,rw afp://Anonymous:1234@192.168.1.3/Daniel
Time-Machine -fstype=afp,rw afp://Anonymous:1234@192.168.1.3/Time-Machi$
Wg -fstype=smb smb://Anonymous:1234@192.168.1.3/Wg

Could someone enlighten me on what I did wrong?
 
Why use a script?

What Ido with ALL older NAS devices is as follows:

1. Make a new folder and name it "Connected Shares" and then leave the new folder in your usr Documents folder. Then drag that folder to your right side of the Dock.

2. Mount the external using the "Connect to Server" function.

3. Once the drive is mounted on your desktop right click the mounted share and make an alias to the share. Then drag that alias to the new folder you made in your Documents folder.

Do this for every share you ever want to connect and save the connection password in Keychain. So whenever you want to connect to the share just click on the new folder in the dock and select that share and it will auto-connect to the share.
 
Thanks that works much better, and it even saves money as the drives in the nas don't always have to spin up when I wake my laptop and the shares are auto mounted.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.