From: Peter Korsgaard Date: Mon, 8 Dec 2008 14:52:16 +0000 (-0000) Subject: make the default etc/init.d/S40network compatible with msh X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7139678f781225bbd2e147a1bcbcf7e4d6d7499e;p=buildroot.git 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 --- 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}"