Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Auto-disable AirPort when ethernet is active' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Auto-disable AirPort when ethernet is active
Authored by: fatcat123 on Oct 21, '10 12:05:39PM
When using this script on Snow Leopard, if I had wireless disabled, shutdown, unplugged the network cable, and then booted back up, the script didn't auto enable the airport like it will on Leopard. I found that the plist was loaded as the user and not root. I moved the plist from /System/Library/LaunchAgents to /System/Library/LaunchDaemons. Upon reboot, the plist was loaded as root and resolved the issue not enabling the airport.

Also, to ensure to force the script to check the state at logout/reboot, I created a script and set a LogoutHook to clear the prev_air_on and prev_eth_on files at log out:

cd /

if [[ -f $airfile ]]; then
	rm -f $airfile
if [[ -f $ethfile ]]; then
	rm -f $ethfile

touch /Library/Preferences/SystemConfiguration/toggleairport.txt
rm -f /Library/Preferences/SystemConfiguration/toggleairport.txt

[ Reply to This | # ]