op_usbhost: Toggle script for enabling / disabling USB Host.
authorMichael Mrozek <EvilDragon@openpandora.de>
Fri, 27 Apr 2012 00:18:27 +0000 (02:18 +0200)
committerMichael Mrozek <EvilDragon@openpandora.de>
Fri, 27 Apr 2012 00:18:27 +0000 (02:18 +0200)
recipes/pandora-system/pandora-scripts/op_usbhost.pnd [new file with mode: 0644]
recipes/pandora-system/pandora-scripts/op_usbhost.sh [new file with mode: 0644]

diff --git a/recipes/pandora-system/pandora-scripts/op_usbhost.pnd b/recipes/pandora-system/pandora-scripts/op_usbhost.pnd
new file mode 100644 (file)
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 (file)
index 0000000..58cb824
--- /dev/null
@@ -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