On 11/21/05, Simon Kuhnle <[EMAIL PROTECTED]> wrote:
> I thought of something like:
> first search available APs with ifconfig -M and set nwid and nwkey
> to AP configuration available.
> Or just exit after the first dhclient run succesfully quitted.
>
I have a fairly simple script that does this part first, setting nwid
and nwkey to a working value, then use that in my hostname.wi0:

! /usr/local/sbin/wiconfig \$if
dhcp NONE NONE NONE

for my dhclient laptops, or

! /usr/local/sbin/wiconfig \$if
inet <whatever>

for static addressing.  It seems to work fine, as long as the dhcp or
inet lines don't contain nwkey or nwid.  There's no reason you can't
hardcode it into your external script, but I've got an
/etc/wiconfig.conf that keeps various networks and WEP keys;  the
script goes through them in order until it finds a working one, or
sets them back to 'any' and '';  it's worked on the few (relatively
simple) networks I've gone to.

Note that this has nothing to do with roaming from one network to the
other, just adds less work on boot.  There may be easier/more elegant
ways of doing this, but it works for me.

CDJ
--
Christian Jones
[EMAIL PROTECTED]
http://www.aleph0.com/~chjones

Reply via email to