All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] initscripts: show status in S40network
@ 2016-08-02 21:52 Thomas Petazzoni
  0 siblings, 0 replies; only message in thread
From: Thomas Petazzoni @ 2016-08-02 21:52 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=e8c18f2d19f59d313a56c6bb1c1826d70263b4b4
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

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 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/initscripts/init.d/S40network b/package/initscripts/init.d/S40network
index 7b11d8b..642c501 100755
--- a/package/initscripts/init.d/S40network
+++ b/package/initscripts/init.d/S40network
@@ -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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-02 21:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-02 21:52 [Buildroot] [git commit] initscripts: show status in S40network Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.