aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2010-02-16 15:17:03 -0500
committerBill Nottingham <notting@redhat.com>2010-04-09 16:35:45 -0400
commit08adb9935d28b9e9d2e91e6beeeb6cdbd0fc6e5e (patch)
treec6901848e5ebabcc83cc884cca5f3a003264882f /sysconfig/network-scripts/ifdown
parentcdeec66b8611b1ebf034ca3a0c8ab0a05ddbf82e (diff)
downloadinitscripts-08adb9935d28b9e9d2e91e6beeeb6cdbd0fc6e5e.tar
initscripts-08adb9935d28b9e9d2e91e6beeeb6cdbd0fc6e5e.tar.gz
initscripts-08adb9935d28b9e9d2e91e6beeeb6cdbd0fc6e5e.tar.bz2
initscripts-08adb9935d28b9e9d2e91e6beeeb6cdbd0fc6e5e.tar.xz
initscripts-08adb9935d28b9e9d2e91e6beeeb6cdbd0fc6e5e.zip
Use NM if it's running and we have a configuration for the device.
Diffstat (limited to 'sysconfig/network-scripts/ifdown')
-rwxr-xr-xsysconfig/network-scripts/ifdown9
1 files changed, 9 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index a0cc0c9e..9c9112cb 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -41,6 +41,15 @@ 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
+ exit $?
+fi
+
if [ -x /sbin/ifdown-pre-local ]; then
/sbin/ifdown-pre-local ${DEVICE}
fi