[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. 1.1.5-74-g83c9b5c
Ben Armstrong
synrg at debian.org
Fri Nov 12 11:01:21 UTC 2010
The following commit has been merged in the master branch:
commit 96b72ec4030a726e03f812c12044b64c202b531a
Author: Luca Niccoli <lultimouomo at gmail.com>
Date: Tue May 18 16:25:32 2010 +0200
Get rid of the wireless toggle handling, now managed by acpi-support; just make sure that the proper script is called also on kernels that dont generate a WLAN button event.
Signed-off-by: Luca Niccoli <lultimouomo at gmail.com>
diff --git a/acpilib/functions.sh b/acpilib/functions.sh
index e17cf6b..8b90a61 100644
--- a/acpilib/functions.sh
+++ b/acpilib/functions.sh
@@ -115,10 +115,3 @@ lock_x_screen()
fi
fi
}
-
-wakeup_wicd() {
- WICD_WAKEUP=/usr/share/wicd/autoconnect.py
- if [ -x $WICD_WAKEUP ]; then
- $WICD_WAKEUP
- fi
-}
diff --git a/eeepc-acpi-scripts/hotkey.sh b/eeepc-acpi-scripts/hotkey.sh
index f4ee14e..7bb151a 100755
--- a/eeepc-acpi-scripts/hotkey.sh
+++ b/eeepc-acpi-scripts/hotkey.sh
@@ -22,6 +22,8 @@ if [ -e "$DEFAULT" ]; then . "$DEFAULT"; fi
code=$3
value=$(test "x$1" = x- && cat "$BACKLIGHT" || echo "0x$3")
+LINUX_MINOR_REV=`uname -r|cut -d. -f3`
+
# In case keys are doubly-reported as hotkey and something else.
# It's random (and irrelevant) which is seen first.
acpi=
@@ -57,15 +59,6 @@ handle_volume_down() {
$PKG_DIR/volume.sh down
}
-show_wireless() {
- if $PKG_DIR/wireless.sh detect; then
- status=Off
- else
- status=On
- fi
- notify wireless "Wireless $status"
-}
-
handle_blank_screen() {
if [ -S /tmp/.X11-unix/X0 ]; then
detect_x_display
@@ -178,16 +171,9 @@ case $code in
# (not a hotkey, not handled here)
# F2/F2 - toggle wireless
- 0000001[01]|WLAN)
- notify wireless 'Wireless ...'
- if grep -q '^H.*\brfkill\b' /proc/bus/input/devices; then
- :
- else
- $PKG_DIR/wireless.sh toggle
- fi
- show_wireless
- if ! $PKG_DIR/wireless.sh detect; then
- wakeup_wicd
+ 0000001[01])
+ if [ $LINUX_MINOR_REV -le 27 ]; then
+ /etc/acpi/asus-wireless.sh || :
fi
;;
diff --git a/eeepc-acpi-scripts/wireless.sh b/eeepc-acpi-scripts/wireless.sh
deleted file mode 100755
index 6c501eb..0000000
--- a/eeepc-acpi-scripts/wireless.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/sh
-
-test -d /sys/bus/platform/devices/eeepc || exit 0
-PKG=eeepc-acpi-scripts
-PKG_DIR=/usr/share/acpi-support/$PKG
-FUNC_LIB=$PKG_DIR/lib/functions.sh
-
-[ -e "$FUNC_LIB" ] || exit 0
-
-. $FUNC_LIB
-
-detect_rfkill wlan
-wlan_control="$RFKILL"
-
-if ! have_dev_rfkill; then
- [ -n "$wlan_control" -a -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
-fi
-
-STATE="$(get_rfkill "$wlan_control")"
-
-cmd="$1"
-if [ "$cmd" = toggle ]; then
- cmd=$((1-STATE))
-fi
-
-case "$cmd" in
- detect)
- exit "$STATE"
- ;;
- on|enable|1)
- if [ "$STATE" = 0 ]; then
- set_rfkill "$wlan_control" 1
- wakeup_wicd
- fi
- ;;
- off|disable|0)
- if [ "$STATE" = 1 ]; then
- # rt2860 needs to be idle when shut down
- if lsmod | grep -q rt2860sta; then
- ifconfig wlan0 down || ifconfig ra0 down || true
- modprobe -r rt2860sta
- fi
- set_rfkill "$wlan_control" 0
- fi
- ;;
- *)
- echo "Usage: $0 [on|off|detect]"
- exit 1
- ;;
-esac
--
Maintenance of eeepc-acpi-scripts debian package
More information about the Debian-eeepc-commits
mailing list