1

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.

2
  • 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
    Commented Jan 17, 2012 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
    Commented Jan 18, 2012 at 0:21

1 Answer 1

2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .