-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}"
-#!/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