All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] sysv init scripts: replace &>/dev/null redirection
@ 2014-10-26 17:51 Thomas Petazzoni
  0 siblings, 0 replies; only message in thread
From: Thomas Petazzoni @ 2014-10-26 17:51 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=5065d475fb9e33f8b6cceb2d44326cffece22999
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

"<command> &>/dev/null" is supposed to redirect all output to /dev/null.

However, in shells that don't support it (dash, ash without bash extensions),
a command like "echo a &>/dev/null" is interpreted as

(a) "echo a" in background
(b) write nothing to /dev/null (redirect <empty command> to /dev/null)

This commit replaces "&>..." with ">/dev/null 2>&1".

Signed-off-by: Andr?? Erdmann <dywi@mailerd.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/network-manager/S45network-manager |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/package/network-manager/S45network-manager b/package/network-manager/S45network-manager
index 112aa66..7880891 100755
--- a/package/network-manager/S45network-manager
+++ b/package/network-manager/S45network-manager
@@ -24,7 +24,7 @@ case "$1" in
 		;;
 	stop)
 		echo -n "Stopping NetworkManager ... "
-			[ ! -z "$PID" ] && kill $PID &> /dev/null
+			[ ! -z "$PID" ] && kill $PID > /dev/null 2>&1
 		if [ $? -gt 0 ]; then
 			echo "failed!"
 		else

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

only message in thread, other threads:[~2014-10-26 17:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-26 17:51 [Buildroot] [git commit] sysv init scripts: replace &>/dev/null redirection 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.