3 source /etc
/acpi
/eee.conf
5 PWR
=$
(cat /proc
/acpi
/asus
/wlan ||
cat /sys
/devices
/platform
/eeepc
/wlan
)
20 if [ "$PWR" = "0" ]; then
21 modprobe pciehp pciehp_force
=1
23 echo 1 > /proc
/acpi
/asus
/wlan
24 echo 1 > /sys
/devices
/platform
/eeepc
/wlan
26 echo "Loading wlan modules..."
29 echo "Creating wlan interface"
30 logger
"create wlan interface"
31 wlanconfig ath0 create wlandev wifi0 wlanmode sta nosbeacon
34 if ifconfig ath0
> /dev
/null
36 echo "Running network up command!"
37 if [ -e /tmp
/eeewlanfailcounter
]; then rm /tmp
/eeewlanfailcounter
;fi
38 (sleep 1; $NETWORK_UP_COMMAND) &
40 FAILC
=$
(</tmp
/eeewlanfailcounter
) || FAILC
=0
41 echo "Current fail count is $FAILC"
44 logger
"Could not bring up WLAN."
45 echo "Could not bring up WLAN, sorry. See dmesg for more information!"
48 echo $
(expr $FAILC + 1) > /tmp
/eeewlanfailcounter
49 /etc
/acpi
/wlan.sh poweroff
50 /etc
/acpi
/wlan.sh poweron
58 if [ "$PWR" = "1" ]; then
59 logger
"remove wlan interface"
60 echo "Removing wlan interface and unloading modules"
63 wlanconfig ath0 destroy
65 echo "Turning wlan device power off"
66 echo 0 > /proc
/acpi
/asus
/wlan
67 echo 0 > /sys
/devices
/platform
/eeepc
/wlan
71 echo "Running network down command"
72 (sleep 1; $NETWORK_DOWN_COMMAND) &