aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-07-23 11:54:18 +0100
committerColin Guthrie <colin@mageia.org>2014-07-23 11:54:18 +0100
commitf7d3fead844d504c88ef4bd2bd3b2a5d168cd1eb (patch)
treeecf11eeec2aca0fcf8a570ad49512a65099e2428
parent2fbb89f3fc1b8196f45c6bc02b006e47658f2be1 (diff)
downloadinitscripts-f7d3fead844d504c88ef4bd2bd3b2a5d168cd1eb.tar
initscripts-f7d3fead844d504c88ef4bd2bd3b2a5d168cd1eb.tar.gz
initscripts-f7d3fead844d504c88ef4bd2bd3b2a5d168cd1eb.tar.bz2
initscripts-f7d3fead844d504c88ef4bd2bd3b2a5d168cd1eb.tar.xz
initscripts-f7d3fead844d504c88ef4bd2bd3b2a5d168cd1eb.zip
Quick fix for network manager API change
-rw-r--r--sysconfig/network-scripts/network-functions5
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