diff options
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r-- | sysconfig/network-scripts/network-functions | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index fd6572ba..ac5917dc 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -274,7 +274,7 @@ do_netreport () is_nm_running () { [ -x /usr/bin/nmcli ] && \ - [ "$(LANG=C LC_ALL=C nmcli -t --fields running nm status 2>/dev/null)" = "running" ] + [ "$(LANG=C LC_ALL=C nmcli -t --fields running general status 2>/dev/null)" = "running" ] } is_nm_device_unavailable () @@ -291,7 +291,8 @@ is_nm_active () is_nm_device_unmanaged () { - LANG=C LC_ALL=C nmcli -t --fields GENERAL dev list iface "${1}" 2>/dev/null | awk -F ':' '/GENERAL.STATE/ { if ($2 == "unmanaged") exit 0 ; else exit 1; }' + [ -x /usr/bin/nmcli ] && \ + LANG=C LC_ALL=C nmcli -t --fields GENERAL dev show "${1}" 2>/dev/null | awk -F ':' '/GENERAL.STATE/ { if ($2 == "unmanaged") exit 0 ; else exit 1; }' } # Sets $alias to the device module if $? != 0 |