aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/network-functions
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2011-03-10 15:45:33 -0500
committerBill Nottingham <notting@redhat.com>2011-04-12 09:56:16 -0400
commitaecdb861e07765bd5e1213c090a78ec16f4f6fff (patch)
treea0bbad42aebe9afd09eccab72d53b10f653b2000 /sysconfig/network-scripts/network-functions
parent214c838cb91fb7f747e262a4c79d20b3c6c8468f (diff)
downloadinitscripts-aecdb861e07765bd5e1213c090a78ec16f4f6fff.tar
initscripts-aecdb861e07765bd5e1213c090a78ec16f4f6fff.tar.gz
initscripts-aecdb861e07765bd5e1213c090a78ec16f4f6fff.tar.bz2
initscripts-aecdb861e07765bd5e1213c090a78ec16f4f6fff.tar.xz
initscripts-aecdb861e07765bd5e1213c090a78ec16f4f6fff.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.
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-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 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