]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
sysv init scripts: replace &>/dev/null redirection
authorAndré Erdmann <dywi@mailerd.de>
Sun, 26 Oct 2014 17:41:45 +0000 (18:41 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 26 Oct 2014 17:51:21 +0000 (18:51 +0100)
"<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

index 112aa660e56d80a501569a8901a77dd79090b630..78808912bf19863a04fa9c64b7e3c96ec8c3edd5 100755 (executable)
@@ -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