aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts/ifdown')
-rwxr-xr-xsysconfig/network-scripts/ifdown8
1 files changed, 2 insertions, 6 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index 9c9112cb..31d3f716 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -41,12 +41,8 @@ then
exit 0
fi
-if [ "$USE_NM" = "true" -a -n "$NAME" -o -n "$UUID" ]; then
- if [ -n "$UUID" ]; then
- nmcli con down uuid "$UUID"
- elif [ -n "$NAME" ]; then
- nmcli con down id "$NAME"
- fi
+if [ "$USE_NM" = "true" ]] && is_nm_active "$DEVICE" ; then
+ nmcli dev disconnect iface "$DEVICE"
exit $?
fi