networkmanager_is_running: we don't need to redirect stderr in /dev/null

This commit is contained in:
oblique 2014-08-17 01:10:50 +03:00
parent 89a457d597
commit 9ab97af451

View File

@ -107,9 +107,9 @@ networkmanager_is_running() {
NM_VER=$(nmcli -v | grep -m1 -oE '[0-9]+(\.[0-9]+)*\.[0-9]+')
version_cmp $NM_VER 0.9.10
if [[ $? -eq 1 ]]; then
NMCLI_OUT=$(nmcli -t -f RUNNING nm 2> /dev/null)
NMCLI_OUT=$(nmcli -t -f RUNNING nm)
else
NMCLI_OUT=$(nmcli -t -f RUNNING g 2> /dev/null)
NMCLI_OUT=$(nmcli -t -f RUNNING g)
fi
[[ "$NMCLI_OUT" == "running" ]]
}