summaryrefslogtreecommitdiff
path: root/meta/packages/oh
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openedhand.com>2007-06-01 11:36:41 +0000
committerMarcin Juszkiewicz <hrw@openedhand.com>2007-06-01 11:36:41 +0000
commit12212aa298f65d996b4fddddb081000e34319279 (patch)
treed78a850532bcdb3a6fe78d288a94e17d128dd1c4 /meta/packages/oh
parent1e2d2eb33a5fba729445a71ce855c4536c909de5 (diff)
downloadopenembedded-core-12212aa298f65d996b4fddddb081000e34319279.tar.gz
openembedded-core-12212aa298f65d996b4fddddb081000e34319279.tar.bz2
openembedded-core-12212aa298f65d996b4fddddb081000e34319279.zip
usbinit: updated to more generic version
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1845 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/oh')
-rw-r--r--meta/packages/oh/usbinit.bb5
-rwxr-xr-xmeta/packages/oh/usbinit/usb-gether32
2 files changed, 20 insertions, 17 deletions
diff --git a/meta/packages/oh/usbinit.bb b/meta/packages/oh/usbinit.bb
index 0adcae1b9c..1d4575bddb 100644
--- a/meta/packages/oh/usbinit.bb
+++ b/meta/packages/oh/usbinit.bb
@@ -1,8 +1,7 @@
-DESCRIPTION = "Quick hack to start gadget Ethernet on the 770"
+DESCRIPTION = "Initscript to manage gadget Ethernet"
LICENSE = "GPL"
-SECTION = "x11"
PRIORITY = "optional"
-PR = "r0"
+PR = "r1"
SRC_URI = "file://usb-gether"
S = "${WORKDIR}"
diff --git a/meta/packages/oh/usbinit/usb-gether b/meta/packages/oh/usbinit/usb-gether
index 590e77b22a..e80a0bb30e 100755
--- a/meta/packages/oh/usbinit/usb-gether
+++ b/meta/packages/oh/usbinit/usb-gether
@@ -1,19 +1,23 @@
-#!/bin/sh
+#! /bin/sh
+#
+# usb-ether Start up the gadget usb ethernet interface.
+#
case "$1" in
- start)
- /sbin/depmod -a
- /sbin/modprobe g_ether
- ifconfig usb0 192.168.1.120
- ;;
-
- stop)
-
- ;;
-
- *)
- echo "usage: $0 { start | stop }"
- ;;
+ start|"")
+ test "$VERBOSE" != no && echo "Initializing g_ether gadget..."
+ modprobe g_ether
+ ifup usb0
+ ;;
+ stop)
+ test "$VERBOSE" != no && echo "Disabling g_ether..."
+ ifdown usb0
+ rmmod g_ether
+ ;;
+ *)
+ echo "Usage: usb-ether {start|stop}" >&2
+ exit 1
+ ;;
esac
exit 0