View previous topic :: View next topic |
Author |
Message |
Napalm Llama Guru
Joined: 04 Jun 2005 Posts: 533 Location: Cardiff, UK
|
Posted: Mon Jan 05, 2009 8:57 pm Post subject: Integrating wpa_supplicant with Gentoo initscripts? |
|
|
Hi there. Due to a recent kernel upgrade, the driver for my wireless card (rt2500) has moved in-tree, and in doing so has apparently dropped builtin support for WPA. I used to run /etc/init.d/net.ra0 start, and the interface was fully up and usable by the time the command exited. I now have /etc/init.d/net.wlan0 start, which exits with the noncommittal "net.wlan0 has started but is inactive." Presumably, this is because the initscript now hands-off the configuration process to wpa_supplicant and then washes its hands of the whole matter.
I'm looking for a way to get back the old functionality, where the initscript gives you a definite answer "has started" - rather than a lame excuse "might be ready at some point in the future". Is this actually possible, without resorting to WEP?
Cheers _________________ Ryzen 5600x; Asus TUF Gaming B550-Plus; Geforce 1660 Super
Registered Linux User #381314
# killall humans |
|
Back to top |
|
|
avieth Veteran
Joined: 17 Sep 2004 Posts: 1945 Location: Canada
|
Posted: Mon Jan 05, 2009 9:19 pm Post subject: |
|
|
Can the gentoo wireless guide help you? I use NetworkManager myself, but I looked at the wpa_supplicant section and it seems that all you have to do is tell the net script to use wpa_supplicant via /etc/init.d/conf.d/net, and then configure wpa_supplicant accordingly.
Ed.: Yes, yes I did misunderstand your question
Last edited by avieth on Tue Jan 06, 2009 9:37 pm; edited 1 time in total |
|
Back to top |
|
|
Napalm Llama Guru
Joined: 04 Jun 2005 Posts: 533 Location: Cardiff, UK
|
Posted: Mon Jan 05, 2009 9:59 pm Post subject: |
|
|
Thanks for your reply, but I think you misunderstand my problem. I have no issues connecting to my network: everything works fine. I just don't like the way the initscript divests itself of all responsibility as soon as it invokes wpa_supplicant. I want it to either monitor wpa_supplicant and report back on the results of connecting, or even beter perform all the connection commands itself like it did when WPA was built-in to the driver.
I get the feeling this is going to be one of those "go-code-it-yourself" questions, though... _________________ Ryzen 5600x; Asus TUF Gaming B550-Plus; Geforce 1660 Super
Registered Linux User #381314
# killall humans |
|
Back to top |
|
|
RoundsToZero Guru
Joined: 17 Nov 2003 Posts: 478 Location: New York, NY
|
Posted: Wed Jan 07, 2009 9:27 pm Post subject: |
|
|
You can use wpa_cli or wpa_gui to monitor the status of wpa_supplicant once it's been started. In fact I think this is what the init scripts do to tell you what's up when you run /etc/init.d/net.wlan0 status for example (i.e. it will change from "inactive" to "started" once it's actually started).
I think there may be some option for this so that you wouldn't have to make something that waits on wpa_cli yourself but I'm not near my Gentoo machine so I can't check. I'm pretty sure that for wired networks if you disable link monitoring it has the effect of waiting for dhcpcd to finish (or whatever you have configured to run when you bring the interface up) when you run the init script. Look in /etc/conf.d/net.example for stuff related to netplug or ifplugd and see if it says anything about wireless. |
|
Back to top |
|
|
agent_jdh Veteran
Joined: 08 Aug 2002 Posts: 1783 Location: Scotland
|
Posted: Sat Mar 14, 2009 2:47 am Post subject: |
|
|
I've done exactly the same - transitioned from the ralink-rt61 (ra0) driver to the in-kernel + wpa_supplicant (wlan0) method. Like yourself, I've successfully configured it fine, and also like yourself, I'd like to stop it "backgrounding" to wpa_supplicant to connect. Or at least wait until it is connected before proceeding.
Reason for this is that ntp-client fires up shortly after and cannot connect as net.wlan0 hasn't finished connecting to my router.
Oh, and a propos of nowt, the hardened server I'm running this on has just been upgraded to hardened-sources-2.6.28, and I get a kernel panic when net.wlan0 connects. I'm having to use my failsafe last-working kernel to get it to work. _________________ Jingle Jangle Jewellery |
|
Back to top |
|
|
agent_jdh Veteran
Joined: 08 Aug 2002 Posts: 1783 Location: Scotland
|
Posted: Wed Mar 18, 2009 12:28 am Post subject: |
|
|
@RoundsToZero (and anyone else, frankly).
I got around to actually reading your post, and had a look at /etc/conf.d/net.example. The required option is -
associate_timeout
So for me using wlan0, adding the following line into the wlan section of /etc/conf.d/net fixes everything so it waits for wpa_supplicant -
associate_timeout_wlan0=30
30 seconds seems to be enough here.
YAY!!!! _________________ Jingle Jangle Jewellery |
|
Back to top |
|
|
|