I find that ra0 needs to be brought up when the wireless toggle is used.
Since I have it configured via /etc/network/interfaces, I also need to use
ifup; given this, it makes sense to always bring the interface down too.

diff --git a/etc/acpi/actions/wireless.sh b/etc/acpi/actions/wireless.sh
--- a/etc/acpi/actions/wireless.sh
+++ b/etc/acpi/actions/wireless.sh
@@ -16,15 +16,15 @@ case $1 in
                # adding a sleep here, due to some bug the driver loading is 
not atomic here
                # and could cause ifconfig to fail
                sleep 1
-               if ! ifconfig $WLAN_IF up; then exec $0 off; fi
            fi
+           if ifup $WLAN_IF || ifconfig $WLAN_IF up; then :; else exec $0 off; 
fi
        fi
        ;;
     off|disable)
        if [ $(cat $wlan_control) = 1 ]; then
             detect_wlan
+           ifdown --force $WLAN_IF
            if [ "$WLAN_MOD" = 'ath_pci' ]; then
-               ifdown --force $WLAN_IF
                modprobe -r $WLAN_MOD
            fi
            echo 0 > $wlan_control

-- 
| Darren Salt    | linux or ds at              | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
| + Burn less waste. Use less packaging. Waste less.     USE FEWER RESOURCES.

I've come for an argument!

_______________________________________________
Debian-eeepc-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-eeepc-devel

Reply via email to