You are not logged in.

#1 2010-09-19 23:58:51

Hy Ginsberg
Member
From: Massachusetts
Registered: 2008-08-22
Posts: 74
Website

[solved] rc.conf equivalent for "iwconfig wlan0 channel auto"?

Hi,

Setting up wireless manually on my new netbook I have to run

    iwconfig wlan0 channel auto

before running

    dhcpcd wlan0

or the latter command times out.  I'd like to get the wireless configured in rc.conf, anybody know how to get that in there?  I tried just adding it to the line that sets up the wireless, as in:

    wlan_wlan0="wlan0 essid mynet key 0123456789 channel auto"

but alas, no luck.  And yes, one of these days I will switch to wicd or some such, but for now I just want to hardcode it into my system's config.

Thanks,
- Hy

Last edited by Hy Ginsberg (2010-09-21 12:10:34)

Offline

#2 2010-09-20 00:07:53

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [solved] rc.conf equivalent for "iwconfig wlan0 channel auto"?

Why aren't you using netcfg? You can set the netcfg to be activated in rc.conf.

Netcfg also allows the use of pre-up commands (like the iwconfig one you need).


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2010-09-20 06:39:27

shemz
Member
Registered: 2010-04-23
Posts: 135

Re: [solved] rc.conf equivalent for "iwconfig wlan0 channel auto"?

Custom commands can be run through rc.local. But its better to use a network daemon for what you are trying to do, as suggested above.

Offline

#4 2010-09-20 07:34:46

Hy Ginsberg
Member
From: Massachusetts
Registered: 2008-08-22
Posts: 74
Website

Re: [solved] rc.conf equivalent for "iwconfig wlan0 channel auto"?

Thanks.  I was not using netcfg only through the desire to "keep it simple," but if that is the right thing to do, then I will give it a go.

- Hy

Offline

#5 2010-09-21 02:04:31

Scotty
Member
From: Canada
Registered: 2010-07-26
Posts: 69

Re: [solved] rc.conf equivalent for "iwconfig wlan0 channel auto"?

Do it in a shell script, then add that script to rc.local.

Offline

#6 2010-09-21 08:34:48

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [solved] rc.conf equivalent for "iwconfig wlan0 channel auto"?

There's really nothing that beats netcfg for ease of use... And on top of that it's integrated with rc.conf. Arch provides the tools, you should use them. KISS is not all about hackery.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#7 2010-09-21 12:09:47

Hy Ginsberg
Member
From: Massachusetts
Registered: 2008-08-22
Posts: 74
Website

Re: [solved] rc.conf equivalent for "iwconfig wlan0 channel auto"?

Thanks, I now have everything nicely working with netcfg.

As far as KISS goes, yes, netcfg is plenty simple, and I am happy with it.  But if you read the wiki entry on wireless setup, netcfg is just one of a long list of options: netcfg, wicd, NetworkManager, Wifi Radar, Wlassistant, Autowifi (deprecated).  Trying to decide which makes sense is a lot of research, and certainly editing rc.conf is simpler than adding any extra component.  It seems natural (but in this case wrong) to think rc.conf would have some mechanism for tweaking the start of the wireless interface, and I think that if it supported my original guess of

    wlan_wlan0="wlan0 essid mynet key 0123456789 channel auto"

that would hardly qualify as "hackery."

Last edited by Hy Ginsberg (2010-09-21 12:10:04)

Offline

Board footer

Powered by FluxBB