Amend Location Changer not working with macOS 14.4

brisbanewebdeveloper

Brisbane Web Developer

Posted on April 8, 2024

Amend Location Changer not working with macOS 14.4

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/[^:]*: //'`
Enter fullscreen mode Exit fullscreen mode

Reference

💖 💪 🙅 🚩
brisbanewebdeveloper
Brisbane Web Developer

Posted on April 8, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related