

The Automoatic setting will select the best location from the list.

Choose Set Service Order from the Action pop-up menu (looks like a gear). To change the priority of your VPN connection: Choose Apple menu > System Preferences and click Network. For each specific network (Home, Work, Starbucks, etc.) create a location in network preferences. We can tell OS X to check the VPN connection first by giving it a higher priority than the other network connections on your Mac. #!/bin/sh#get the ssid of the network you are on#shown on two lines should be one with a spacessid=`ioreg -l -n AirPortDriver | grep APCurrentSSID | sed 's/^.*= "\(.*\)". But just to connect to your network, the Automatic Network preferences is more than enough.
#AUTOMATIC NETWORK CONNECTIONS ON MAC MAC#
If this is not true for you, it should be possible to change it to recognize the MAC address of the router or access point instead of the SSID, but I haven't had luck with that yet. If all the networks you connect to have unique SSIDs, this script works fine. You've been asked to select the volumes (folders) to want to mount.

Skip to step 8 if you'd like to automatically connect to the NAS drive, otherwise congrats you're done b. You were successfully able to mount the shared folder to your Mac. So I messed around a lot, did a lot of googling and poking around, and came up with the following solution.įirst, I had to have a way of changing the Location based on the wireless network I was connected to. Three different things can happen depending on the network address you've entered. It seemed to me that there was enough information available to set the Location automatically whenever the wireless network changed. It always bothered me that when I went from one place to another (work, home, friend's house) that I had to manually choose from my pre-configured Locations from the Apple menu.
