Commit 5065d475 authored by André Erdmann's avatar André Erdmann Committed by Thomas Petazzoni
Browse files

sysv init scripts: replace &>/dev/null redirection



"<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: default avatarAndré Erdmann <dywi@mailerd.de>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 2113ed46
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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