[Debian-eeepc-devel] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. 17a35764f279f03fdea9f65b120c14606353520d

Damyan Ivanov dmn at debian.org
Mon Aug 18 05:14:50 UTC 2008


The following commit has been merged in the master branch:
commit 45e54c62d566b26e405598cca8a826d7b281fd32
Author: Damyan Ivanov <dmn at debian.org>
Date:   Mon Aug 18 08:11:46 2008 +0300

    move detect_wlan() from wireless.sh to a common functions.sh
    
    that function shall also be used in hotkey.sh when
    testing whether wlan is enabled
    
    thanks to  Eddy Parris for reporting

diff --git a/actions/wireless.sh b/actions/wireless.sh
index 5e1ee12..e5d2713 100755
--- a/actions/wireless.sh
+++ b/actions/wireless.sh
@@ -1,21 +1,10 @@
 #!/bin/sh
 
+. /usr/share/eeepc-acpi-scripts/functions.sh
+
 wlan_control=/sys/devices/platform/eeepc/wlan
 [ -e $wlan_control ] || wlan_control=/proc/acpi/asus/wlan # pre-2.6.26
 
-detect_wlan()
-{
-    if lspci|grep -i 'network controller'|grep -q 'RaLink'; then
-        WLAN_IF=ra0
-        WLAN_MOD=rt2860sta
-    elif lspci|grep -i 'atheros'|grep -q -i 'wireless'; then
-        WLAN_IF=ath0
-        WLAN_MOD=ath_pci
-    fi
-
-    echo "Detected WLAN module $WLAN_MOD on $WLAN_IF" >&2
-}
-
 case $1 in
     on|enable)
 	if [ $(cat $wlan_control) = 0 ]; then
diff --git a/functions.sh b/functions.sh
new file mode 100644
index 0000000..4fc47c1
--- /dev/null
+++ b/functions.sh
@@ -0,0 +1,15 @@
+# common eeepc-acpi-scripts functions
+
+# detect the name of the WLAN interface and kernel module
+detect_wlan()
+{
+    if lspci|grep -i 'network controller'|grep -q 'RaLink'; then
+        WLAN_IF=ra0
+        WLAN_MOD=rt2860sta
+    elif lspci|grep -i 'atheros'|grep -q -i 'wireless'; then
+        WLAN_IF=ath0
+        WLAN_MOD=ath_pci
+    fi
+
+    echo "Detected WLAN module $WLAN_MOD on $WLAN_IF" >&2
+}

-- 
Maintenance of eeepc-acpi-scripts debian package



More information about the Debian-eeepc-devel mailing list