Summary
Location Changer to automatically activate the network interface depending on the current Wi-Fi network, stopped working.
Solution
Revise the way to extract the current Wi-Fi network :
/usr/local/bin/locationchanger
======
# SSID=`/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | grep ' SSID' | cut -d : -f 2- | sed 's/^[ ]*//'`
SSID=`networksetup -listallhardwareports | awk '/Wi-Fi/{getline; print $2}' | xargs networksetup -getairportnetwork | sed 's/[^:]*: //'`
Top comments (0)