[ I'm using Debian Sarge with the prebuilt kernel 2.6.7-1-686 and
with hand-compiled wpa_supplicant-0.2.4 and hostap-0.2.4. ]
Has anyone hints about how to integrate wpa_supplicant into Debian's
startup scripts?
I currently use in /etc/network/interfaces the following setting:
iface wlan0 inet dhcp
wireless_mode managed
pre-up rmmod orinoco_pci || true
pre-up rmmod hostap_pci || true
pre-up prism2_srec -v -r $IFACE /etc/prism-firmware/rf010704.hex
pre-up ifconfig wlan0 down
pre-up wpa_supplicant -B -i$IFACE -c /etc/wpa_supplicant.conf
It works for now, but it's butt ugly.
The first command is there because at boot the orinoco_pci module is
automatically loaded to manage my prism wireless card whereas I need the
hostap driver.
The second command is there because the hostap driver is also auto-loaded
at boot, but since the orinoco_pci already manages my card, the hostap
driver ends up sitting there idle, so I need to unload/reload (the reload
is implicit vi modutils.conf).
The third is because I need a newer firmware but don't dare to flash it, so
I have to download it into the card's RAM after loading the driver.
The fourth is because it seems that wpa_supplicant doesn't work if the
interface is not "down" before I start it. I'm not sure if it's always
the case.
The fifth actually starts the deamon. I should actually add some post-down
commands to turn off wpa_supplicant, but I can't seem to find a clean way
to do that other than a "killall" which is pretty ugly (it might kill the
wpa_supplicant of another interface).
This is very ugly and brittle. Maybe I should simply forget about using
ifupdown for that, and start wpa_supplicant and dhclient manually.
But I hope there's a better way. Any hint?
Stefan
PS: On a related note, how do I prevent all those extra modules/drivers
from being loaded? It's a real pain to have my fast ethernet card as eth2
(was eth0 originally and then moved to eth1 and then eth2 as kernel modules
started to support more of my hardware) were both eth0 (orinoco_pci) and
eth1 (ip1394) are actually unusable in my case.
|