With Feisty, at least, NetworkManager is too flaky if you ever put the system to sleep; it constantly reloads the ipw3945 driver before wpa_supplicant has had a chance to associate... and the prior version of ipw3945 is unloaded (due in part to the user-level daemon which is required.. thank you Intel..)
So, here's my lazy-but-functional workaround:
/etc/network/interfaces:
Code:
auto eth1
iface eth1 inet dhcp
pre-up /etc/init.d/wifi_wpa.sh start
pre-down /etc/init.d/wifi_wpa.sh stop
/etc/init.d/wifi_wpa.sh:
Code:
#!/bin/sh
PATH=/bin:/usr/bin:/sbin:/usr/sbin
BIN=/sbin/wpa_supplicant
PIDFILE=/var/run/wpa_supplicant.pid
. /lib/lsb/init-functions
case "$1" in
start)
if [ -x /sbin/wpa_supplicant ]; then
$BIN -ieth1 -c /etc/wpa_supplicant.conf -Dwext -w -P $PIDFILE 2>&1 &
fi
;;
stop)
killall wpa_supplicant
;;
*)
;;
esac
exit 0
/etc/wpa_supplicant.conf:
Code:
network={
ssid="MYSSID"
scan_ssid=1
psk="MYPSK"
}
/etc/acpi/suspend.d/95-iface-down.sh:
Code:
#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin
/sbin/ifdown eth1
/etc/acpi/resume.d/95-iface-up.sh:
Code:
#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin
#Just to be sure
/sbin/ifdown eth1
sleep 2
/sbin/ifup eth1
Yes, it takes an extra 4 seconds to startup, but it works without fail. Anyone who's been dealing with this mess at all, I strongly suggest 'apt-get --purge remove network-manager\*' and be done with it.
Make sure you chmod 755 every ".sh" shell script, and set your wpa_supplicant.conf 600, all files owned by root - if you want to keep your WPA key safe (but then again, anybody on your machine probably has that, anyhow)
Bookmarks