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: André Erdmann <dywi@mailerd.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
2113ed46b2
commit
5065d475fb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user