[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:39 UTC 2008
The following commit has been merged in the master branch:
commit 35f850ed4c8de7a4d3819ecd1aade0e889d54e40
Author: Damyan Ivanov <dmn at debian.org>
Date: Sat Aug 16 01:18:40 2008 +0300
postinst: add WLAN_(IF|MOD) to default variables unless already present
diff --git a/debian/postinst b/debian/postinst
index bc8bff2..dd3bf03 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -2,8 +2,30 @@
set -e
+DEFAULT=/etc/default/eeepc-acpi-scripts
+
+add_wlan_vars_to_default()
+{
+ if ! egrep -q '^WLAN_(IF|MOD)' $DEFAULT; then
+ if lspci|grep Network|grep Atheros|grep -q wireless; then
+ WLAN_IF=ath0
+ WLAN_MOD=ath_pci
+ elif lspci|grep Network|grep -q RaLink; then
+ WLAN_IF=ra0
+ WLAN_MOD=rt2860sta
+ fi
+ cat <<EOF >>$DEFAULT
+
+# Model-specific wireless interface and module
+WLAN_IF=$WLAN_IF
+WLAN_MOD=$WLAN_MOD
+EOF
+ fi
+}
+
case "$1" in
configure)
+ add_wlan_vars_to_default
invoke-rc.d acpid restart>/dev/null
;;
--
Maintenance of eeepc-acpi-scripts debian package
More information about the Debian-eeepc-devel
mailing list