[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. 8597528e8a0c72b05253f0f23bfa6fd5ab5fa685

Darren Salt linux at youmustbejoking.demon.co.uk
Fri Mar 27 20:19:36 UTC 2009


The following commit has been merged in the master branch:
commit 8597528e8a0c72b05253f0f23bfa6fd5ab5fa685
Author: Darren Salt <linux at youmustbejoking.demon.co.uk>
Date:   Fri Mar 27 20:02:58 2009 +0000

    Report wireless state using the hw state rather than driver presence.

diff --git a/etc/acpi/actions/hotkey.sh b/etc/acpi/actions/hotkey.sh
index 33c7830..9f9c972 100755
--- a/etc/acpi/actions/hotkey.sh
+++ b/etc/acpi/actions/hotkey.sh
@@ -31,11 +31,10 @@ handle_volume_down() {
 }
 
 show_wireless() {
-    detect_wlan
-    if grep -q $WLAN_IF /proc/net/wireless; then
-	status=On
-    else
+    if /etc/acpi/actions/wireless.sh detect; then
 	status=Off
+    else
+	status=On
     fi
     notify wireless "Wireless $status"
 }
diff --git a/etc/acpi/actions/wireless.sh b/etc/acpi/actions/wireless.sh
index a028e9c..617826a 100755
--- a/etc/acpi/actions/wireless.sh
+++ b/etc/acpi/actions/wireless.sh
@@ -17,6 +17,9 @@ if [ "$cmd" = toggle ]; then
 fi
 
 case "$cmd" in
+    detect)
+	exit "$STATE"
+	;;
     on|enable|1)
 	if [ "$STATE" = 0 ]; then
 	    echo 1 > $wlan_control

-- 
Maintenance of eeepc-acpi-scripts debian package



More information about the Debian-eeepc-commits mailing list