From bec37b082a490e101799810fe210aa273ad26de3 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') diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 0d2528ee..9a47449b 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -230,7 +230,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