Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] initscripts: add newline to network stop message
@ 2016-08-02 19:50 Vivien Didelot
  2016-08-02 20:12 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Vivien Didelot @ 2016-08-02 19:50 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 using echo instead.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 package/initscripts/init.d/S40network | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/initscripts/init.d/S40network b/package/initscripts/init.d/S40network
index 7b11d8b..213f5b5 100755
--- a/package/initscripts/init.d/S40network
+++ b/package/initscripts/init.d/S40network
@@ -12,7 +12,7 @@ case "$1" in
 	/sbin/ifup -a
 	;;
   stop)
-	printf "Stopping network..."
+	echo "Stopping network..."
 	/sbin/ifdown -a
 	;;
   restart|reload)
-- 
2.9.2

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

* [Buildroot] [PATCH] initscripts: add newline to network stop message
  2016-08-02 19:50 [Buildroot] [PATCH] initscripts: add newline to network stop message Vivien Didelot
@ 2016-08-02 20:12 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-08-02 20:12 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue,  2 Aug 2016 15:50:40 -0400, Vivien Didelot wrote:
> The output of "/etc/init.d/S40network stop" was lacking a newline due to
> the usage of printf. Fix it by using echo instead.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
>  package/initscripts/init.d/S40network | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/initscripts/init.d/S40network b/package/initscripts/init.d/S40network
> index 7b11d8b..213f5b5 100755
> --- a/package/initscripts/init.d/S40network
> +++ b/package/initscripts/init.d/S40network
> @@ -12,7 +12,7 @@ case "$1" in
>  	/sbin/ifup -a
>  	;;
>    stop)
> -	printf "Stopping network..."
> +	echo "Stopping network..."
>  	/sbin/ifdown -a
>  	;;
>    restart|reload)

No, using printf is the right thing to do. However, there should
instead be:

	printf "Stopping network: "
	...
	[ $? -eq 0 ] && echo "OK" || echo "FAIL"

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

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

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

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