From 12212aa298f65d996b4fddddb081000e34319279 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Fri, 1 Jun 2007 11:36:41 +0000 Subject: usbinit: updated to more generic version git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1845 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- meta/packages/oh/usbinit/usb-gether | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'meta/packages/oh/usbinit') diff --git a/meta/packages/oh/usbinit/usb-gether b/meta/packages/oh/usbinit/usb-gether index 590e77b22..e80a0bb30 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 -- cgit v1.2.3