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

Damyan Ivanov dmn at debian.org
Fri Aug 15 22:18:40 UTC 2008


The following commit has been merged in the master branch:
commit 0c2370c3b6cacd26ecf90bdf4b1d98f3d1467e4e
Author: Damyan Ivanov <dmn at debian.org>
Date:   Sat Aug 16 01:19:08 2008 +0300

    wireless.sh: use variables for wlan interface and module

diff --git a/actions/wireless.sh b/actions/wireless.sh
index 9a094cc..4673228 100755
--- a/actions/wireless.sh
+++ b/actions/wireless.sh
@@ -1,5 +1,13 @@
 #!/bin/sh
 
+WLAN_IF=ath0
+WLAN_MOD=ath_pci
+
+DEFAULT=/etc/default/eee-acpi-scripts
+if [ -r $DEFAULT ]; then
+    . $DEFAULT
+fi
+
 wlan_control=/sys/devices/platform/eeepc/wlan
 [ -e $wlan_control ] || wlan_control=/proc/acpi/asus/wlan # pre-2.6.26
 
@@ -9,17 +17,17 @@ case $1 in
 	    modprobe -r pciehp
 	    modprobe pciehp pciehp_force=1
 	    echo 1 > $wlan_control
-	    modprobe ath_pci
+	    modprobe $WLAN_MOD
 	    # adding a sleep here, due to some bug the driver loading is not atomic here
 	    # and could cause ifconfig to fail
 	    sleep 1
-	    if ! ifconfig ath0 up; then exec $0 off; fi
+	    if ! ifconfig $WLAN_IF up; then exec $0 off; fi
 	fi
 	;;
     off|disable)
 	if [ $(cat $wlan_control) = 1 ]; then
-	    ifdown --force ath0
-	    modprobe -r ath_pci
+	    ifdown --force $WLAN_IF
+	    modprobe -r $WLAN_MOD
 	    echo 0 > $wlan_control
 	fi
 	;;

-- 
Maintenance of eeepc-acpi-scripts debian package



More information about the Debian-eeepc-devel mailing list