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'd like to be able to mount an nfs NAS mount point whenever I connect to my home network and initiate an rsync to it. I saw the post for "How can I automount afp volumes at startup? ", although there are some similarities, my trigger is quite different. Would appreciate any help figuring this one out with automator. Apologies if this is already answered elsewhere.

share|improve this question
    
I have a shell script that I've used for similar purposes and just have it running via a launchd plist every 5 min or so. I'll try to post it when I get back to the machine it's on. Essentially it looks at the MAC address of your current router and if you're at the MAC address designated for your home, it mounts a volume. –  afragen Jan 17 '12 at 22:23
    
If you can send along the terminal command that works for you to mount the NFS disk. I can fix the script for you. –  afragen Jan 18 '12 at 0:21

1 Answer 1

OK, what follows is an adapted version of a shell script that I have running on my local Macs to auto mount certain AFP volumes when I'm at home. You'll need to adjust the mount_nfs line, enter the MAC address for your home router, and adjust the volume name for the mount (if you want).

I have this script triggered to run every 5 minutes via a launchd file in ~/Library/LaunchAgents

Code on Pastebin

share|improve this answer

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.