Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jun 2002 17:00:47 +0200
From:      Olof Samuelsson <>
Cc:        freebsd-mobile@FreeBSD.ORG
Subject:   Re: start_if.wi0??
Message-ID:  <>
In-Reply-To: <000001c215bb$0bf098e0$1401a8c0@frankenmobl>
References:  <000001c215bb$0bf098e0$1401a8c0@frankenmobl>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
>>>>> "Tony" == Tony Saign <> writes:

> Anyone have an example of a script to connect to 2 different nets?
> I've been playing around with it without success!

> Running 4.6 -stable and MiniPCI Intersil 802.11b card.

I use a Lucent card, but I do soemthing like this (improvements

ifconfig wi0 inet netmask broadcast up
sleep 2
CNETNAME=`wicontrol |sed -ne '/Current netname/s/.*\[ \(.*\) \]/\1/p'`
logger -p user.notice "After sleeping and starting if, netname == \"$CNETNAME\""
case "$CNETNAME" in
                logger -p user.notice "Setting netname to mynet for wi0"
                wicontrol -n mynet
                logger -p user.notice "Setting wep key for mynet"
                ifconfig wi0 nwkey 0x1234567890
                logger -p user.notice "Setting netname to myothernet for wi0"
                wicontrol -n myothernet
                logger -p user.notice "Setting wep key for myothernet"
                ifconfig wi0 nwkey 0x1234567890
                logger -p user.notice "I'm away, not changing netname"
                logger -p user.notice "I'm away, not enabling WEP"

To Unsubscribe: send mail to
with "unsubscribe freebsd-mobile" in the body of the message

Want to link to this message? Use this URL: <>