LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   How to Starting WPA_Supplicant on boot? (https://www.linuxquestions.org/questions/linux-wireless-networking-41/how-to-starting-wpa_supplicant-on-boot-363210/)

SmileZero 09-14-2005 03:09 AM

How to Starting WPA_Supplicant on boot?
 
I'm using Fedora Core 4, after playing hours and hours with the Kernels, ndiswrapper and wpa_supplicant, I can make my DWL-G510 up and running. However I always need to login as root to start the wpa_supplicant to connect to the router. How do I automate this?

2Gnu 09-14-2005 09:32 AM

Add the full path name of the command and any options to your rc.local script.

Made-up example:

/usr/local/wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -iwlan0

kaon 10-01-2005 08:23 AM

How about in slackware 10.2?

I see the script of wpa_supplicant is added to rc.wireless, but it turns out that dhcpd won't get an IP for my wireless adapter after being loaded during startup.

I need to issue command (dhcpcd wlan0) manually before surfing.

Thanks.

2Gnu 10-01-2005 09:26 AM

There's a config file, which I can't think of off the top of my head, that specifies dhcp on boot. If the authentication process is getting in the way of the I/F picking up an IP, you can probably fix it by putting the dhcp request in rc.local.

/sbin/dhcpcd wlan0 &

kaon 10-01-2005 10:43 PM

To 2Gnu:

Sometimes wpa_supplicant is not loaded at startup and I have run wpa_supplicant together with dhcpcd wlan0, therefore I have to do it manually, which is boring and dull.

I know very little about bash script.

Any method to fix it up?

2Gnu 10-01-2005 11:21 PM

You can put both the wpa_supplicant call and the dhcp request in rc.local. You can even put a wait in between the two commands to give the supplicant time to authenticate, if you need to.

First, you'd need to find out where wpa_supplicant is run now and comment out that line.

Let's say it's in /etc/rc.d/rc.inet1 (Just an example - I have no idea where it is.) Edit that file and put a # in front of the line with wpa_supplicant.

Then, edit rc.local to include something like:
/sbin wpa_supplicant (plus whatever options you need for your setup)
sleep 5
/sbin/dhcpcd wlan0


All times are GMT -5. The time now is 06:20 AM.