Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] initscripts: add newline to network stop message
@ 2016-08-02 21:38 Vivien Didelot
  2016-08-02 21:55 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Vivien Didelot @ 2016-08-02 21:38 UTC (permalink / raw)
  To: buildroot

The output of "/etc/init.d/S40network stop" was lacking a newline due to
the usage of printf. Fix it by echoing the status.

v1 -> v2: echo OK/FAIL instead of s/printf/echo/.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.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
-- 
2.9.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-02 21:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-02 21:38 [Buildroot] [PATCH v2] initscripts: add newline to network stop message Vivien Didelot
2016-08-02 21:55 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox