Subject: Re: multiple wireless profiles?
To: Tomoki NetBSD Mailing Lists <tomoki.netbsd.ml@gmail.com>
From: David Brownlee <abs@NetBSD.org>
List: netbsd-users
Date: 05/28/2005 01:23:48
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
--0-1531651931-1117239390=:738
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; format=flowed
Content-ID: <Pine.NEB.4.62.0505280120381.738@localhost.>
On Fri, 27 May 2005, Tomoki NetBSD Mailing Lists wrote:
> I travel alot and access many different wireless networks with
> different ssid and wep key combinations. Under windows I am able to
> register all of the configurations so that it will try them in order
> until it finds the right one.
>
> Is there a way to do this under netbsd. right now I am resetting the
> configuration each time.
I use my laptop in three environments:
- ethernet directly connected
- wireless with known wep
- random wireless unencrypted
I use the following (recently messed with) script in /etc/rc.d,
plus its autonet.local in /etc/
It works for me, it may do for some others :)
--
David/absolute -- www.NetBSD.org: No hype required --
--0-1531651931-1117239390=:738
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME=autonet
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.NEB.4.62.0505280116300.738@localhost.>
Content-Description:
Content-Disposition: ATTACHMENT; FILENAME=autonet
IyEvYmluL3NoDQojICRJZDogYXV0b25ldCx2IDEuNCAyMDA1LzA1LzI0IDEw
OjI0OjIwIGFicyBFeHAgJA0KDQojIFJFUVVJUkU6IG5ldHdvcmsgbW91bnRj
cml0bG9jYWwNCiMgQkVGT1JFOiAgTkVUV09SS0lORw0KDQojIGF1dG9uZXQg
d2lsbCBjaGVjaw0KIyAtIGZvciBhbiAnYWN0aXZlJyBldGhlcm5ldCBpbnRl
cmZhY2UNCiMgLSBhbnkgd2lyZWxlc3MgaW50ZXJmYWNlIGZvciBhbiBzc2lk
IHdpdGggYW4gZW50cnkgaW4gcmMuY29uZg0KIyAgIG9mIHRoZSBmb3JtOiBu
d2tleV88c3NpZD49MHgxMzM0N2Q2ZTFlNmI5ZGVjODg0YTk3MTF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oJICAgICAgICAgICAgICAgICAgICAg
ICAgW2RCbV06CVsgMCAvIC0xNDkgLyAtMTQ5IF0NCglCU1MgQmVhY29uIElu
dGVydmFsIFttc2VjXToJWyAxMDAgXQ0KCUNhcGluZm86CQkJWyBFU1MgV0VQ
IF0NCglEYXRhUmF0ZSBbTWJwc106CQlbIDIgXQ0KICAgICAgIFstYSBhY2Nl
c3MgcG9pbnQgZGVuc2l0eV0NCiAgICAgICBbLW0gTUFDIGFkZHJlc3NdIFst
ZCBtYXggZGF0YSBsZW5ndGhdIFstciBSVFMgdGhyZXNob2xkXQ0KICAgICAg
IFstTSAwfDFdIFstUiAxfDNdIFstQSAxfDJdIFstZyBmcmFnbWVudGF0aW9u
IHRocmVzaG9sZF0NCg==
--0-1531651931-1117239390=:738
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME=autonet.local
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.NEB.4.62.0505280116301.738@localhost.>
Content-Description:
Content-Disposition: ATTACHMENT; FILENAME=autonet.local
IyEvYmluL3NoDQoNCmFjdGlvbj0kMQ0KaW50ZXJmYWNlPSQyDQp0eXBlPSQz
DQoNCmNhc2UgJGFjdGlvbiBpbg0KICAgIHN0YXJ0KQ0KCWVjaG8gTDE2TUxF
ID4gL2Rldi9zcGVha2VyDQoJOzsNCiAgICBzdGFydF9kb25lKQ0KCS9ldGMv
cmMuZC9uYW1lZCBvbmVzdGFydA0KCS9ldGMvcmMuZC9udHBkYXRlIG9uZXN0
YXJ0DQoJL2V0Yy9yYy5kL250cGQgb25lc3RhcnQNCgkvZXRjL3JjLmQvbHBk
IG9uZXN0YXJ0DQoJL2V0Yy9yYy5kL2V4aW0gb25lc3RhcnQNCglwa2lsbCAt
SU5UIC1mICdebXRlbCAtVCBtc2VydicNCglpZiBbICR0eXBlID0gZXRoZXJu
ZXQgXSA7IHRoZW4NCgkgICAgYXdrICd7c3ViKCIjLioiLCIiKTtpZigkMz09
Im5mcyIpe3ByaW50ICQxfX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