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


Click here to return to the 'Update Location on Wake' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Update Location on Wake
Authored by: hintbw on Mar 25, '05 02:31:20PM

I found I had to make the following change in the script (see below) in order for it to work for me. It is an excellent script, now I don't ever have to remember to change locations.

The one other element to the script that I would like to add is for it to change locations based on ip address (i.e. have it check for a wired ethernet ip address and set the location depending on the ip address it is currently getting, if it doesn't find a wired ip address to fall back to the current script to check for a wireless network and set the location accordingly.

Thanks for the script Colter

Here's the original code


#look up the status
location=`grep -i "IT Airport" .wlans | awk -F"\t" '{print $2}'`

Here's what I had to change it to get it to work for me.


#look up the status
location=`grep -i "$wlan" .wlans | awk -F"\t" '{print $2}'`


[ Reply to This | # ]