summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtarget/generic/target_busybox_skeleton/etc/init.d/S40network22
-rwxr-xr-xtarget/generic/target_skeleton/etc/init.d/S40network22
2 files changed, 12 insertions, 32 deletions
diff --git a/target/generic/target_busybox_skeleton/etc/init.d/S40network b/target/generic/target_busybox_skeleton/etc/init.d/S40network
index d835d9c72..ad6d250b5 100755
--- a/target/generic/target_busybox_skeleton/etc/init.d/S40network
+++ b/target/generic/target_busybox_skeleton/etc/init.d/S40network
@@ -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}"
diff --git a/target/generic/target_skeleton/etc/init.d/S40network b/target/generic/target_skeleton/etc/init.d/S40network
index d835d9c72..ad6d250b5 100755
--- a/target/generic/target_skeleton/etc/init.d/S40network
+++ b/target/generic/target_skeleton/etc/init.d/S40network
@@ -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}"