From 7139678f781225bbd2e147a1bcbcf7e4d6d7499e Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Mon, 8 Dec 2008 14:52:16 +0000 Subject: [PATCH] make the default etc/init.d/S40network compatible with msh 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 --- .../etc/init.d/S40network | 22 +++++-------------- .../target_skeleton/etc/init.d/S40network | 22 +++++-------------- 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 d835d9c72a..ad6d250b5b 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 d835d9c72a..ad6d250b5b 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}" -- 2.30.2