From aecdb861e07765bd5e1213c090a78ec16f4f6fff Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 10 Mar 2011 15:45:33 -0500 Subject: Fix check for unmanaged devices so it does the right thing with devices NM doesn't know about at all. (#670154) It was returning nonexistent devices, or devies NM knew nothing about (bridges), as being managed. --- sysconfig/network-scripts/network-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysconfig/network-scripts/network-functions') diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 9645a379..2b7dac3e 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -214,7 +214,7 @@ is_nm_active () is_nm_device_unmanaged () { - LANG=C nmcli -t --fields device,state dev status 2>/dev/null | grep -q "^${1}:unmanaged$" + LANG=C nmcli -t --fields GENERAL dev list iface "${1}" 2>/dev/null | awk -F ':' '/GENERAL.STATE/ { if ($2 == "unmanaged") exit 0 ; else exit 1; }' } # Sets $alias to the device module if $? != 0 -- cgit v1.2.1