pandora-scripts-wifi: New package for Wifi-Scripts
authorMichael Mrozek <EvilDragon@openpandora.org>
Tue, 26 Mar 2013 13:37:05 +0000 (14:37 +0100)
committerMichael Mrozek <EvilDragon@openpandora.org>
Tue, 26 Mar 2013 13:37:05 +0000 (14:37 +0100)
recipes/pandora-system/pandora-scripts-wifi.bb [new file with mode: 0644]
recipes/pandora-system/pandora-scripts-wifi/nettool.pnd [new file with mode: 0644]
recipes/pandora-system/pandora-scripts-wifi/op_wifi.pnd [new file with mode: 0644]
recipes/pandora-system/pandora-scripts-wifi/op_wifi.sh [new file with mode: 0644]

diff --git a/recipes/pandora-system/pandora-scripts-wifi.bb b/recipes/pandora-system/pandora-scripts-wifi.bb
new file mode 100644 (file)
index 0000000..2e8be94
--- /dev/null
@@ -0,0 +1,29 @@
+DESCRIPTION = "Scripts to support system options on the OpenPandora."
+LICENSE = "GPLV2"
+
+COMPATIBLE_MACHINE = "omap3-pandora"
+
+RDEPENDS = "pandora-scripts"
+
+PR = "r1"
+
+SRC_URI = " \
+          file://op_wifi.sh \
+          file://op_wifi.pnd \  
+          file://nettool.pnd \
+"
+
+do_install() {
+          install -d ${D}${prefix}/pandora/scripts/
+          install -m 0755 ${WORKDIR}/op_wifi.sh ${D}${prefix}/pandora/scripts/
+
+          install -d ${D}${prefix}/pandora/apps/
+         install -m 0755 ${WORKDIR}/op_wifi.pnd ${D}${prefix}/pandora/apps/
+
+         install -d ${D}${prefix}/pandora/mmenu/
+         install -m 0755 ${WORKDIR}/nettool.pnd ${D}${prefix}/pandora/mmenu/
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+FILES_${PN} += "${prefix} ${datadir}"
diff --git a/recipes/pandora-system/pandora-scripts-wifi/nettool.pnd b/recipes/pandora-system/pandora-scripts-wifi/nettool.pnd
new file mode 100644 (file)
index 0000000..a978d97
Binary files /dev/null and b/recipes/pandora-system/pandora-scripts-wifi/nettool.pnd differ
diff --git a/recipes/pandora-system/pandora-scripts-wifi/op_wifi.pnd b/recipes/pandora-system/pandora-scripts-wifi/op_wifi.pnd
new file mode 100644 (file)
index 0000000..4630fac
Binary files /dev/null and b/recipes/pandora-system/pandora-scripts-wifi/op_wifi.pnd differ
diff --git a/recipes/pandora-system/pandora-scripts-wifi/op_wifi.sh b/recipes/pandora-system/pandora-scripts-wifi/op_wifi.sh
new file mode 100644 (file)
index 0000000..8d2759e
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Released under the GPL
+
+# This script simply toggles internal WiFi on or off.
+cd /
+if [ "`lsmod | grep wl1251`" ]
+then
+       notify-send -u normal "WLAN" "WLAN is being disabled..." -i /usr/share/icons/hicolor/32x32/apps/nm-no-connection.png
+       ifconfig wlan0 down
+       rmmod board_omap3pandora_wifi wl1251_sdio wl1251
+else
+       notify-send -u normal "WLAN" "WLAN is being enabled..." -i /usr/share/icons/hicolor/32x32/apps/nm-device-wired.png
+       /etc/init.d/wl1251-init start
+fi