From: Michael Mrozek Date: Tue, 26 Mar 2013 13:37:05 +0000 (+0100) Subject: pandora-scripts-wifi: New package for Wifi-Scripts X-Git-Tag: sz_154~23 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afe3e763317eae92593391525bab9be0520681a4;p=openpandora.oe.git pandora-scripts-wifi: New package for Wifi-Scripts --- diff --git a/recipes/pandora-system/pandora-scripts-wifi.bb b/recipes/pandora-system/pandora-scripts-wifi.bb new file mode 100644 index 0000000..2e8be94 --- /dev/null +++ b/recipes/pandora-system/pandora-scripts-wifi.bb @@ -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 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 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 index 0000000..8d2759e --- /dev/null +++ b/recipes/pandora-system/pandora-scripts-wifi/op_wifi.sh @@ -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