aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsysconfig/network-scripts/ifdown11
1 files changed, 8 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index fd766427..addf7345 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -41,9 +41,14 @@ then
exit 0
fi
-if [ "$USE_NM" = "true" ]] && is_nm_active "$DEVICE" ; then
- nmcli dev disconnect iface "$DEVICE"
- exit $?
+if [ "$USE_NM" = "true" ]; then
+ if [ -n "$UUID" -a -z "$DEVICE" ]; then
+ DEVICE=$(nmcli con status | awk "\$4 == \"$UUID\" { print \$3 }")
+ fi
+ if [ -n "$DEVICE" ] && is_nm_active "$DEVICE" ; then
+ nmcli dev disconnect iface "$DEVICE"
+ exit $?
+ fi
fi
if [ -x /sbin/ifdown-pre-local ]; then