ifdown: check NM_CONTROLLED after sourcing the device conf file

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
Davide Madrisan 2013-02-22 19:51:27 +01:00
parent a8c3002082
commit 93397b69a2

View File

@ -12,11 +12,11 @@ if [ -z "$DEVICE" ]; then
exit 1 exit 1
fi fi
[ "$NM_CONTROLLED" = "0" ] || exit 0
[ -r $network_devices/ifcfg-${DEVICE} ] && [ -r $network_devices/ifcfg-${DEVICE} ] &&
. $network_devices/ifcfg-${DEVICE} . $network_devices/ifcfg-${DEVICE}
[ "$NM_CONTROLLED" = "no" ] || exit 0
if [ -x $network_devices/ifdown-${DEVICE} ]; then if [ -x $network_devices/ifdown-${DEVICE} ]; then
$network_devices/ifdown-${DEVICE} $network_devices/ifdown-${DEVICE}
else else