aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2013-08-30 15:10:18 +0200
committerLukas Nykryn <lnykryn@redhat.com>2014-01-14 13:24:53 +0100
commitf171c45d652a8afebab75e38f132e36e308de18a (patch)
tree9489cb1e3963b1b9f7dafc3d7d23887fa1913a46 /sysconfig/network-scripts
parentddda5f6f818831b1fa37337be0ac9c0f619df1ca (diff)
downloadinitscripts-f171c45d652a8afebab75e38f132e36e308de18a.tar
initscripts-f171c45d652a8afebab75e38f132e36e308de18a.tar.gz
initscripts-f171c45d652a8afebab75e38f132e36e308de18a.tar.bz2
initscripts-f171c45d652a8afebab75e38f132e36e308de18a.tar.xz
initscripts-f171c45d652a8afebab75e38f132e36e308de18a.zip
update functions who call nmcli (#1002958)
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-xsysconfig/network-scripts/ifdown2
-rw-r--r--sysconfig/network-scripts/network-functions4
2 files changed, 3 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index 65608ee2..7fbedbea 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -43,7 +43,7 @@ fi
if [ "$_use_nm" = "true" ]; then
if [ -n "$UUID" -a -z "$DEVICE" ]; then
- DEVICE=$(nmcli -t --fields uuid,devices con status | awk -F ':' "\$1 == \"$UUID\" { print \$2 }")
+ DEVICE=$(nmcli r -t --fields uuid,devices con show active | awk -F ':' "\$1 == \"$UUID\" { print \$2 }")
fi
if [ -n "$DEVICE" ] && ! is_nm_device_unmanaged "$DEVICE" ; then
if ! LC_ALL=C nmcli -t -f STATE,DEVICE dev status | egrep -q "^(failed|disconnected|unmanaged|unavailable):$DEVICE$"; then
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index c699fc0d..cd4171fe 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -271,7 +271,7 @@ do_netreport ()
is_nm_running ()
{
- [ "$(LANG=C nmcli -t --fields running nm status 2>/dev/null)" = "running" ]
+ [ "$(LANG=C nmcli -t --fields running general status 2>/dev/null)" = "running" ]
}
is_nm_active ()
@@ -281,7 +281,7 @@ is_nm_active ()
is_nm_device_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; }'
+ LANG=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