[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. a003008367dc02c38b813c1a074889a4c7602705
Darren Salt
linux at youmustbejoking.demon.co.uk
Mon Feb 2 17:49:57 UTC 2009
The following commit has been merged in the master branch:
commit a003008367dc02c38b813c1a074889a4c7602705
Author: Darren Salt <linux at youmustbejoking.demon.co.uk>
Date: Mon Feb 2 17:03:10 2009 +0000
The same ACPI code may be used for wireless off as well as on.
diff --git a/debian/changelog b/debian/changelog
index 3b84c42..e485181 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ eeepc-acpi-scripts (1.0.12) UNRELEASED; urgency=low
* Try to use rfkill when toggling wireless & bluetooth.
* Ignore events when shutting down or rebooting.
* Give immediate indication of pressing of Fn-F2.
+ * The same ACPI key code may be used for wireless on as well as wireless off.
-- Darren Salt <linux at youmustbejoking.demon.co.uk> Mon, 02 Feb 2009 16:55:55 +0000
diff --git a/etc/acpi/actions/hotkey.sh b/etc/acpi/actions/hotkey.sh
index 035453c..e9f6234 100755
--- a/etc/acpi/actions/hotkey.sh
+++ b/etc/acpi/actions/hotkey.sh
@@ -98,7 +98,7 @@ case $code in
# Fn+F2 -- toggle wireless
00000010)
notify wireless 'Wireless ...'
- /etc/acpi/actions/wireless.sh on
+ /etc/acpi/actions/wireless.sh toggle
show_wireless
;;
00000011)
diff --git a/etc/acpi/actions/wireless.sh b/etc/acpi/actions/wireless.sh
index 00a79af..1467e4f 100755
--- a/etc/acpi/actions/wireless.sh
+++ b/etc/acpi/actions/wireless.sh
@@ -7,8 +7,13 @@ wlan_control="$RFKILL"
[ -e $wlan_control ] || wlan_control=/sys/devices/platform/eeepc/wlan # pre-2.6.28
[ -e $wlan_control ] || wlan_control=/proc/acpi/asus/wlan # pre-2.6.26
-case $1 in
- on|enable)
+cmd="$1"
+if [ "$cmd" = toggle ]; then
+ cmd=$((1-$(cat $wlan_control)))
+fi
+
+case "$cmd" in
+ on|enable|1)
if [ $(cat $wlan_control) = 0 ]; then
echo 1 > $wlan_control
detect_wlan
@@ -22,7 +27,7 @@ case $1 in
fi
fi
;;
- off|disable)
+ off|disable|0)
if [ $(cat $wlan_control) = 1 ]; then
detect_wlan
if [ "$WLAN_MOD" = 'ath_pci' ]; then
--
Maintenance of eeepc-acpi-scripts debian package
More information about the Debian-eeepc-commits
mailing list