You are not logged in.
Salut,
as netcfg2 does not work with my wireless connection, I have to set up the connection manually. For not having to type in the commands every time, I created a bash script.
#!/bin/bash
iwconfig wlan0 mode managed essid mynetwork channel 6
ifconfig wlan0 up
wpa_supplicant -D wext -i wlan0 -c /etc/wpa_supplicant.conf -dddd &
dhcpd wlan0
This works fine till the wpa_supplicant line. wpa_supplicant is not started in the background (as I thought, the ampersand at the end of the line would.
So how can I get wpa_supplicant run in the background?
Thanks in advance,
Stefan
Last edited by vbtricks (2008-05-11 09:13:36)
Offline
How do you know it isn't? What exactly does happen?
Offline
On thing is that even if it starts, it does take it a couple of seconds to connect, so it's probably not very good to run dhcpcd right after wpa_supplicant. Another thing is that you probably have a typo up there, shouldn't it be 'dhcpcd' instead of 'dhcpd'?
Offline
How do you know it isn't? What exactly does happen?
The script does not return to the user-prompt. Is an ampersand at the end of the line the correct solution, or are you unsure yourself?
On thing is that even if it starts, it does take it a couple of seconds to connect, so it's probably not very good to run dhcpcd right after wpa_supplicant. Another thing is that you probably have a typo up there, shouldn't it be 'dhcpcd' instead of 'dhcpd'?
Well, as the wpa_supplication command is not really run in the background the script did never execute the dhcpcd command. After having solved the above, correcting the spell-mistake will be a smaller problem. Even calling the dhcpcd command myself would be no unworkable way, the open root-shell (as I have to use another as the one calling the script is blocked) is a far greater problem...
Offline
wpa_supplicant goes to the background by using the switch "-B".
man wpa_supplicant
Offline
Salut,
"-B" works fine.
Thanks,
Stefan
Offline