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

Damyan Ivanov dmn at debian.org
Tue Jan 26 06:03:59 UTC 2010


The following commit has been merged in the master branch:
commit bf8c05790342ab512676ec4f282da919a8525560
Author: Damyan Ivanov <dmn at debian.org>
Date:   Tue Jan 26 08:03:27 2010 +0200

    functions/detect_rfkill: walk over arguments
    
    the first that is matched in the output of 'rfkill list' is used
    
    The old code used the second argument if the first is matches in the
    output if 'rfkill list'. This caused RFKILL to be set to 'wifi' (or
    'wlan' before a09ac0d), which caused get_rfkill to return bogus results

diff --git a/functions.sh b/functions.sh
index b802c2f..4429a4c 100644
--- a/functions.sh
+++ b/functions.sh
@@ -11,9 +11,12 @@ if have_dev_rfkill; then
     detect_rfkill()
     {
 	RFKILL=''
-	if rfkill list | grep -q "$1:"; then
-	    RFKILL="${2:-1}"
-	fi
+        for i in $@; do
+            if rfkill list | grep -q "$i:"; then
+                RFKILL="$i"
+                break
+            fi
+        done
     }
 
     get_rfkill()

-- 
Maintenance of eeepc-acpi-scripts debian package



More information about the Debian-eeepc-commits mailing list