With small variations upon your script I have:
1) ~/wpa dir with the following contents:
r...@om-gta02 ~ $ ls wpa/
amigos.wpa casa.wpa go maxperf spot.wpa
wifi-dhcp.sh
(the .wpa files are wpa config files with special setups).
2) maxperf is for the weird cases:
r...@om-gta02 ~ $ cat wpa/maxperf
#!/bin/sh
wmiconfig -ieth0 --power=maxperf
3) go just glue's Paul's commands (but required a bit more of sleep time
in order to work reliably, and using sh instead of bash):
r...@om-gta02 ~ $ cat wpa/go
#!/bin/sh
CONF="$1"
set -x
fsoraw -r WiFi -- sh -c "sleep 5; wpa_supplicant -i eth0 -D wext -c $CONF" &
sleep 10 && wpa_cli -a /home/root/wpa/wifi-dhcp.sh -B -G100
4) and wifi-dhcp.sh is slightly modified (for instance, I don't have
dhclient):
r...@om-gta02 ~ $ cat wpa/wifi-dhcp.sh
#!/bin/sh
if [ "$2" == "CONNECTED" ] ; then
udhcpc $1
pkill -f "wpa_cli -a"
wpa_cli -a $0 -B -G100
fi
5) running the following works, and recovers wifi when resumed after
suspend:
cd wpa ; ./go casa.wpa
Rui
_______________________________________________
Openmoko community mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/community