|
|
Display current network location via the Terminal
Here's a script I wrote a couple of weeks ago when I discovered the scselect and scutil commands. I had some initial timing issues with DHCP, but I think I fixed that with a 'sleep 5'. It's fairly limited as it relies on a DHCP server at each "Location" and that the first three octets of the IP address be different. Hopefully someone can improve on it and make it more useful.
Display current network location via the Terminal
How about using arp -a to get the mac addresses of your router (via netstat -rn | grep default) and then use that to build a list of what the should be the correct location if you see that mac address in the mac table. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|