Updated documentation for 0.2 release
[mtetherd] / mtetherd-usbnet-enable.sh
index fcea859..ae7c215 100755 (executable)
@@ -64,29 +64,9 @@ if [ $? = 0 ]; then
     LUN0='gadget-lun0'
     LUN1='gadget-lun1'
 
-    if [ $# = 0 ]; then
-      # unload all
-      echo "" > $GADGETPATH/$LUN0/file
-      echo "" > $GADGETPATH/$LUN1/file
-      exit 0
-    fi
-
-    # NOTE: works only for 1 or 2 device arguments
-    for lun in $LUN0 $LUN1; do
-      grep $1 $GADGETPATH/$lun/file > /dev/null
-      RC=$?
-
-      if [ $# = 2 ]; then
-        grep $2 $GADGETPATH/$lun/file > /dev/null
-        RC2=$?
-      else
-        RC2=1
-      fi
-
-      if [ $RC = 0 -o $RC2 = 0 ]; then
-        echo "" > $GADGETPATH/$lun/file
-      fi
-    done
+    # unload all
+    echo "" > $GADGETPATH/$LUN0/file
+    echo "" > $GADGETPATH/$LUN1/file
 
     /sbin/rmmod g_file_storage
     if [ $? != 0 ]; then
@@ -105,5 +85,6 @@ if [ $RC != 0 ]; then
     logger "$0: failed to install g_ether"
     exit 1
 fi
-
+        
 exit 0
+