[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. 1.1.5-35-g12b0e53

Darren Salt linux at youmustbejoking.demon.co.uk
Tue Jan 26 15:53:37 UTC 2010


The following commit has been merged in the master branch:
commit 12b0e533580981d1c4c9317bca3e2a7f4206317b
Author: Darren Salt <linux at youmustbejoking.demon.co.uk>
Date:   Tue Jan 26 15:45:15 2010 +0000

    Simplify rfkill handling; depend on rfkill ≥ 0.3-3.

diff --git a/debian/changelog b/debian/changelog
index 1bf9098..5728288 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,10 +2,10 @@ eeepc-acpi-scripts (1.1.8) UNRELEASED; urgency=low
 
   [ Darren Salt ]
   * Don't fail on upgrade, removal etc. if the acpid init script is missing.
+  * Simplify rfkill handling. (Requires rfkill 0.3-3.)
 
   [ Damyan Ivanov ]
   * wireless.sh/disable: do not fail if no interface can be brought down
-  * functions.sh/detect_rfkill(): extract rfkill index
   * add ${misc:Depends} to dependencies
 
  -- Darren Salt <linux at youmustbejoking.demon.co.uk>  Sat, 23 Jan 2010 03:59:24 +0000
diff --git a/debian/control b/debian/control
index 63520a8..49fddbd 100644
--- a/debian/control
+++ b/debian/control
@@ -15,7 +15,7 @@ DM-Upload-Allowed: yes
 Package: eeepc-acpi-scripts
 Architecture: all
 Conflicts: acpi-support
-Depends: acpid (>= 1.0.8-6), acpi-support-base, pm-utils, rfkill,
+Depends: acpid (>= 1.0.8-6), acpi-support-base, pm-utils, rfkill (>= 0.3-3),
  ${misc:Depends}
 Recommends: alsa-utils
 Suggests: aosd-cat, ttf-dejavu | ttf-bitstream-vera | ttf-freefont
diff --git a/etc/acpi/actions/gsm.sh b/etc/acpi/actions/gsm.sh
index f0bd4cb..5de8ae9 100644
--- a/etc/acpi/actions/gsm.sh
+++ b/etc/acpi/actions/gsm.sh
@@ -8,7 +8,7 @@ FUNC_LIB=/usr/share/$PKG/functions.sh
 . $FUNC_LIB
 
 # first try kernel rfkill
-detect_rfkill eeepc-wwan3g wwan
+detect_rfkill wwan
 
 if [ -n "$RFKILL" ]; then
     if have_dev_rfkill; then
diff --git a/etc/acpi/actions/wireless.sh b/etc/acpi/actions/wireless.sh
index a7cf29d..1d2cddd 100755
--- a/etc/acpi/actions/wireless.sh
+++ b/etc/acpi/actions/wireless.sh
@@ -2,7 +2,7 @@
 
 . /usr/share/eeepc-acpi-scripts/functions.sh
 
-detect_rfkill eeepc-wlan
+detect_rfkill wlan
 wlan_control="$RFKILL"
 
 if ! have_dev_rfkill; then
diff --git a/etc/acpi/lib/bluetooth.sh b/etc/acpi/lib/bluetooth.sh
index 5c0a5ab..e716f47 100644
--- a/etc/acpi/lib/bluetooth.sh
+++ b/etc/acpi/lib/bluetooth.sh
@@ -2,7 +2,7 @@
 #
 # to be sourced
 
-detect_rfkill eeepc-bluetooth bluetooth
+detect_rfkill bluetooth
 BT_CTL="$RFKILL"
 if ! have_dev_rfkill; then
   [ -e "$BT_CTL" ] || BT_CTL=/sys/devices/platform/eeepc/bluetooth # pre-2.6.28
diff --git a/functions.sh b/functions.sh
index 01abe18..e17cf6b 100644
--- a/functions.sh
+++ b/functions.sh
@@ -10,17 +10,18 @@ if have_dev_rfkill; then
     # detect which rfkill has name=$1
     detect_rfkill()
     {
-	RFKILL=''
 	# expecting something like
 	#   0: eeepc-wlan: Wireless LAN
-	# we want the number before the first colon
-	RFKILL=$(rfkill list | sed "/ $1: /! d; s/:.\\+//; q")
+	RFKILL=''
+	if test "$(rfkill list "$1")" != ''; then
+	    RFKILL="$1"
+	fi
     }
 
     get_rfkill()
     {
 	# simple yes/no, so...
-	expr 4 - length "$(rfkill list | sed -e "/^$1:/! d; N; s/.*://")"
+	expr 4 - length "$(rfkill list "$1" | sed -e '/^\tSoft blocked:/! d; s/.*://; q')"
     }
 
     set_rfkill()

-- 
Maintenance of eeepc-acpi-scripts debian package



More information about the Debian-eeepc-commits mailing list