RE: Location manager type tool?

Subject: RE: Location manager type tool?
From: Steve McGrane (
Date: Thu Feb 08 2001 - 19:07:48 MST

Good thing this isn't windows where you have to reboot the machine (or
sleep/wake) to get the IP info to change...

FWIW, I often have to do a full stop/start on network to make it take
effect, the restart for some reason doesn't always work for me.

- Steve
Mac Friendly Co-Location

-----Original Message-----
From: Philip Good []
Sent: Thursday, February 08, 2001 7:39 PM
Subject: Re: Location manager type tool?

Here is what I use, it's not much, but works:

# eth-switch
# switch between home and work ethernet
if [ $1 == "home" ]; then
  echo "Switching to home:"
  cp -f /etc/resolv.conf.home /etc/resolv.conf
  cp -f /etc/sysconfig/network.home /etc/sysconfig/network
  cp -f /etc/sysconfig/network-scripts/home.ifcfg-eth0
  cp -f /etc/sysconfig/network-scripts/home.ifcfg-airport
  /etc/rc.d/init.d/network restart
elif [ $1 == "work" ]; then
  echo "Switching to work:"
  cp -f /etc/ /etc/resolv.conf
  cp -f /etc/sysconfig/ /etc/sysconfig/network
  cp -f /etc/sysconfig/network-scripts/work.ifcfg-eth0
  /etc/rc.d/init.d/network restart
  echo "Not a valid option: $1"

I'd like to make it more generic and check to make sure all the cp's
worked, but for now its simple and works. Just make sure you have the
files defined which are copied back and forth.


> >Any thoughts on the right way to do this?
> Must be synchronicity. I was just about to post this question. I'm
> a Linux newbie running YDL on a PowerBook G3/400 (Lombard). I'm
> still messing with trying to get it to recognize ethernet *at all*
> but when it does I'll need some kind of Location Manager-like tool...
> Megan Lynch
> Ethknow -
> Your Guide to the Ethnic Bay Area.

Philip Good
Red Planet Development, Red Canyon Software, Good Chi Tai Chi

This archive was generated by hypermail 2a24 : Thu Feb 08 2001 - 19:41:37 MST