Networking Forums

Networking Forums > Computer Networking > Linux Networking > Integrating wpa_supplicant and startup scripts

Reply
Thread Tools Display Modes

Integrating wpa_supplicant and startup scripts

 
 
Stefan Monnier
Guest
Posts: n/a

 
      08-07-2004, 02:38 AM
[ 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Workstation Hang on running startup scripts John Neeson Windows Networking 4 04-07-2009 01:01 PM
Openswan: Building and Integrating Virtual Private Networks published. Kshipra Linux Networking 5 04-16-2006 08:45 AM
wpa_supplicant Randomthots Linux Networking 1 10-17-2005 07:14 PM
Need help integrating wireless and wired networks jake4714 Wireless Internet 2 09-08-2005 10:21 AM
Integrating GIS and Remote Data Acquisition into Your Mobile Solutions Johann Blake Wireless Internet 0 12-05-2003 08:49 AM



1 2 3 4 5 6 7 8 9 10 11