Subject: Re: Location manager type tool?
From: Philip Good (firstname.lastname@example.org)
Date: Thu Feb 08 2001 - 17:38:58 MST
Here is what I use, it's not much, but works:
# 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
elif [ $1 == "work" ]; then
echo "Switching to work:"
cp -f /etc/resolv.conf.work /etc/resolv.conf
cp -f /etc/sysconfig/network.work /etc/sysconfig/network
cp -f /etc/sysconfig/network-scripts/work.ifcfg-eth0
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 - http://www.ethknow.com
> 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 - 17:40:17 MST