omap3-pandora-kernel2: update
[openpandora.oe.git] / recipes / pandora-system / pandora-scripts / op_wifi.sh
1 #!/bin/sh
2 #
3 # Released under the GPL
4
5 # This script simply toggles internal WiFi on or off.
6 cd /
7 if [ "`lsmod | grep wl1251`" ]
8 then
9         notify-send -u normal "WLAN" "WLAN is being disabled..." -i /usr/share/icons/hicolor/32x32/apps/nm-no-connection.png
10         ifconfig wlan0 down
11         rmmod board_omap3pandora_wifi wl1251_sdio wl1251
12 else
13         notify-send -u normal "WLAN" "WLAN is being enabled..." -i /usr/share/icons/hicolor/32x32/apps/nm-device-wired.png
14         /etc/init.d/wl1251-init start
15 fi