From: Michael Mrozek Date: Fri, 27 Apr 2012 00:18:27 +0000 (+0200) Subject: op_usbhost: Toggle script for enabling / disabling USB Host. X-Git-Tag: sz_beta4~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11efdb5820d0ad2e24ee582bf6c5903495665fec;p=openpandora.oe.git op_usbhost: Toggle script for enabling / disabling USB Host. --- diff --git a/recipes/pandora-system/pandora-scripts/op_usbhost.pnd b/recipes/pandora-system/pandora-scripts/op_usbhost.pnd new file mode 100644 index 0000000..7f283ce Binary files /dev/null and b/recipes/pandora-system/pandora-scripts/op_usbhost.pnd differ diff --git a/recipes/pandora-system/pandora-scripts/op_usbhost.sh b/recipes/pandora-system/pandora-scripts/op_usbhost.sh new file mode 100644 index 0000000..58cb824 --- /dev/null +++ b/recipes/pandora-system/pandora-scripts/op_usbhost.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Released under the GPL + +# This script simply toggles USB Host on or off. +cd / +if [ "`lsmod | grep ehci_hcd`" ] +then + notify-send -u normal "USB" "USB Host is being disabled..." -i /usr/share/icons/gnome/32x32/devices/usbpendrive_unmount.png + rmmod ehci-hcd +else + notify-send -u normal "USB" "USB Host is being enabled..." -i /usr/share/icons/gnome/32x32/devices/usbpendrive_unmount.png + modprobe ehci-hcd +fi