Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I would like to automatically mount remote AFP shared drives.

The ideal solution would be to auto mount the remote drives even before the session was opened.

Edit: I currently use login items, but as stated above auto mounting before the session or even without the session starting would be ideal.

Examples would be very appreciated.

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

I have a shell script that I run via a launchd plist every few minutes to automount an NAS drive. I use it from home to mount my NAS as it contains our shared iTunes Media folder.

You can look at the script Code on Pastebin.

I you have questions about the code I'll be happy to discuss. It has a lots of error checking etc. Using a shell script and a launchd plist has the benefit if the the mount becomes unmounted for any reason.

share|improve this answer
    
I will test that. –  Coyote Mar 19 '12 at 22:44
    
FYI, in function mount_disk the syntax for an AFP mount is mount_afp afp://ip-address/volume-name $vol –  afragen Mar 19 '12 at 23:13
add comment

You can put aliases to the remote volumes in your Login Items folder.

A nice explanation of this feature is available from Apple on the web and the built-in help:

share|improve this answer
add comment

You can write a shell script that gets exectued with an AppleScript script.

share|improve this answer
1  
Would you provide an example for a setup? –  Coyote Mar 19 '12 at 17:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.