make the default etc/init.d/S40network compatible with msh
authorPeter Korsgaard <jacmet@sunsite.dk>
Mon, 8 Dec 2008 14:52:16 +0000 (14:52 -0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 8 Dec 2008 14:52:16 +0000 (14:52 -0000)
msh is currently the only good choice for uClinux but it doesn't
understands shell functions.  In this case there is nothing to gain
by using shell functions anyway.

Signed-off-by: Nicolas Pitre <nico@cam.org>
target/generic/target_busybox_skeleton/etc/init.d/S40network
target/generic/target_skeleton/etc/init.d/S40network

index d835d9c72aac4967104c96e8dd2ba66275d31abe..ad6d250b5bbc1f26869960578e1025c8c69386eb 100755 (executable)
@@ -3,28 +3,18 @@
 # Start the network....
 #
 
-start() {
-       echo "Starting network..."
-       /sbin/ifup -a
-}      
-stop() {
-       echo -n "Stopping network..."
-       /sbin/ifdown -a
-}
-restart() {
-       stop
-       start
-}      
-
 case "$1" in
   start)
-       start
+       echo "Starting network..."
+       /sbin/ifup -a
        ;;
   stop)
-       stop
+       echo -n "Stopping network..."
+       /sbin/ifdown -a
        ;;
   restart|reload)
-       restart
+       "$0" stop
+       "$0" start
        ;;
   *)
        echo $"Usage: $0 {start|stop|restart}"
index d835d9c72aac4967104c96e8dd2ba66275d31abe..ad6d250b5bbc1f26869960578e1025c8c69386eb 100755 (executable)
@@ -3,28 +3,18 @@
 # Start the network....
 #
 
-start() {
-       echo "Starting network..."
-       /sbin/ifup -a
-}      
-stop() {
-       echo -n "Stopping network..."
-       /sbin/ifdown -a
-}
-restart() {
-       stop
-       start
-}      
-
 case "$1" in
   start)
-       start
+       echo "Starting network..."
+       /sbin/ifup -a
        ;;
   stop)
-       stop
+       echo -n "Stopping network..."
+       /sbin/ifdown -a
        ;;
   restart|reload)
-       restart
+       "$0" stop
+       "$0" start
        ;;
   *)
        echo $"Usage: $0 {start|stop|restart}"