[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. ffb6d1402ba80546f65282d36ff453e0e202407d
Darren Salt
linux at youmustbejoking.demon.co.uk
Fri Mar 27 17:06:00 UTC 2009
The following commit has been merged in the master branch:
commit ffb6d1402ba80546f65282d36ff453e0e202407d
Author: Darren Salt <linux at youmustbejoking.demon.co.uk>
Date: Fri Mar 27 16:58:21 2009 +0000
Put the WLAN status flag in a shell variable.
diff --git a/etc/acpi/actions/wireless.sh b/etc/acpi/actions/wireless.sh
index 0b7f125..a028e9c 100755
--- a/etc/acpi/actions/wireless.sh
+++ b/etc/acpi/actions/wireless.sh
@@ -9,14 +9,16 @@ wlan_control="$RFKILL"
|| wlan_control=/sys/devices/platform/eeepc/wlan # pre-2.6.28
[ -e $wlan_control ] || wlan_control=/proc/acpi/asus/wlan # pre-2.6.26
+STATE="$(cat $wlan_control)"
+
cmd="$1"
if [ "$cmd" = toggle ]; then
- cmd=$((1-$(cat $wlan_control)))
+ cmd=$((1-STATE))
fi
case "$cmd" in
on|enable|1)
- if [ $(cat $wlan_control) = 0 ]; then
+ if [ "$STATE" = 0 ]; then
echo 1 > $wlan_control
detect_wlan
if [ "$WLAN_MOD" = 'ath_pci' ] || [ "$WLAN_MOD" = 'ath5k' ]; then
@@ -30,7 +32,7 @@ case "$cmd" in
fi
;;
off|disable|0)
- if [ $(cat $wlan_control) = 1 ]; then
+ if [ "$STATE" = 1 ]; then
detect_wlan
if [ "$WLAN_MOD" = 'ath_pci' ] || [ "$WLAN_MOD" = 'ath5k' ]; then
ifdown --force $WLAN_IF
--
Maintenance of eeepc-acpi-scripts debian package
More information about the Debian-eeepc-commits
mailing list