"<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>
;;
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