aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2011-03-10 15:45:33 -0500
committerBill Nottingham <notting@redhat.com>2011-03-10 15:45:33 -0500
commitbec37b082a490e101799810fe210aa273ad26de3 (patch)
tree567f676b333616185dc7e8d27b9614fefe6da2d2
parent98b65a4e09626db8b948e15d41e73f690a8202e1 (diff)
downloadinitscripts-bec37b082a490e101799810fe210aa273ad26de3.tar
initscripts-bec37b082a490e101799810fe210aa273ad26de3.tar.gz
initscripts-bec37b082a490e101799810fe210aa273ad26de3.tar.bz2
initscripts-bec37b082a490e101799810fe210aa273ad26de3.tar.xz
initscripts-bec37b082a490e101799810fe210aa273ad26de3.zip
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.
-rw-r--r--sysconfig/network-scripts/network-functions2
1 files changed, 1 insertions, 1 deletions
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