diff options
Diffstat (limited to 'sysconfig/network-scripts/ifdown')
-rwxr-xr-x | sysconfig/network-scripts/ifdown | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown index a0cc0c9e..fd766427 100755 --- a/sysconfig/network-scripts/ifdown +++ b/sysconfig/network-scripts/ifdown @@ -16,7 +16,7 @@ CONFIG=$1 exit 1 } -need_config $CONFIG +need_config "${CONFIG}" [ -f "$CONFIG" ] || { echo $"usage: ifdown <device name>" >&2 @@ -41,6 +41,11 @@ then exit 0 fi +if [ "$USE_NM" = "true" ]] && is_nm_active "$DEVICE" ; then + nmcli dev disconnect iface "$DEVICE" + exit $? +fi + if [ -x /sbin/ifdown-pre-local ]; then /sbin/ifdown-pre-local ${DEVICE} fi |