From 93397b69a2273f76a4d6647a751dfd140fb24cc8 Mon Sep 17 00:00:00 2001 From: Davide Madrisan Date: Fri, 22 Feb 2013 19:51:27 +0100 Subject: [PATCH] ifdown: check NM_CONTROLLED after sourcing the device conf file Signed-off-by: Davide Madrisan --- sbin/ifdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ifdown b/sbin/ifdown index bafbde5..be389c7 100644 --- a/sbin/ifdown +++ b/sbin/ifdown @@ -12,11 +12,11 @@ if [ -z "$DEVICE" ]; then exit 1 fi -[ "$NM_CONTROLLED" = "0" ] || exit 0 - [ -r $network_devices/ifcfg-${DEVICE} ] && . $network_devices/ifcfg-${DEVICE} +[ "$NM_CONTROLLED" = "no" ] || exit 0 + if [ -x $network_devices/ifdown-${DEVICE} ]; then $network_devices/ifdown-${DEVICE} else