initscripts: show status in S40network
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Tue, 2 Aug 2016 21:38:03 +0000 (17:38 -0400)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 2 Aug 2016 21:52:56 +0000 (23:52 +0200)
The output of "/etc/init.d/S40network start/stop" was lacking a
newline due to the usage of printf. Fix it by echoing the status, like
we do in other init scripts.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/initscripts/init.d/S40network

index 7b11d8b90208a6bfb602e70e43bf108c8b48b470..642c5013ac6581ac1cf16ec7c5c00c723ccf6ac9 100755 (executable)
@@ -8,12 +8,14 @@ mkdir -p /run/network
 
 case "$1" in
   start)
-       echo "Starting network..."
+       printf "Starting network: "
        /sbin/ifup -a
+       [ $? = 0 ] && echo "OK" || echo "FAIL"
        ;;
   stop)
-       printf "Stopping network..."
+       printf "Stopping network"
        /sbin/ifdown -a
+       [ $? = 0 ] && echo "OK" || echo "FAIL"
        ;;
   restart|reload)
        "$0" stop