diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2008-12-08 14:52:16 +0000 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2008-12-08 14:52:16 +0000 |
commit | 7139678f781225bbd2e147a1bcbcf7e4d6d7499e (patch) | |
tree | d966fdb3f1db406817a0f603b3df8d22153eedd2 /target | |
parent | 8e436ee7727164603dd8e9cc24af74872752b73e (diff) |
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 <nico@cam.org>
Diffstat (limited to 'target')
-rwxr-xr-x | target/generic/target_busybox_skeleton/etc/init.d/S40network | 22 | ||||
-rwxr-xr-x | target/generic/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 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}" |