[MacTUG] Ensuring Airport and Bluetooth is always off

Donald Duff-McCracken dsmccrac at uwaterloo.ca
Thu Feb 28 14:45:41 EST 2013


Mike P pointed out that even if Airport is turned off he has seen it come back on at various times. Given that issue and the fact that I have not figured out how to hide the icons for these in the menubar, I have decided to put the following in my loginhook to ensure both are turned off on login. It seems to work fine. Note bluetooth turning off requires me to use 'blueutil' which I have decided to bite the bullet and try. I have can always pull it if it is problematic.

Anyhow, this is going in my loginhook script

##PART 4: TURN OFF AIRPORT AND BLUETOOTH
##THE NEXT LINE REQUIRES BLUEUTIL TO BE IN /LIBRARY/LABS/SCRIPTS
/Library/Lab/scripts/blueutil off
##MAKE SURE THAT AIRPORT IS TURNED OFF
wifi=$(networksetup -listallhardwareports | grep -E "Wi-Fi" -A 1 | grep -o en.)
networksetup -setairportpower $wifi off


BTW, my loginhook is being called because I added a line in my deploystudio post install script that said I had a loginhook. This is the line I added in deploystudio:
##SET LOGIN HOOK
sudo defaults write com.apple.loginwindow LoginHook /Library/Lab/scripts/login_script

This all seems to work and is ensuring that these services are not running at login, so I will likely call my niggling problems 'resolved'

------------------------------------
Donald Duff-McCracken
Technical Services Manager
Mapping, Analysis & Design
Faculty of Environment
University of Waterloo
(519) 888-4567 x32151
https://uwaterloo.ca/environment-computing/about/people/donald-duff-mccracken

------------
To request help from MAD please use Request Tracker. For info see:
https://rt.uwaterloo.ca/~wwwrt/cgi-bin/rtuser.pl

------------
This email communication is intended as a private communication for the sole use of the primary addressee and those individuals listed for copies in the original message. The information contained in this email is private and confidential and If you are not an intended recipient you are hereby notified that copying, forwarding or other dissemination or distribution of this communication by any means is prohibited.  If you are not specifically authorized to receive this email and if you believe that you received it in error please notify the original sender immediately.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uwaterloo.ca/pipermail/mactug/attachments/20130228/4a769f90/attachment.html>


More information about the MacTUG mailing list