ifdown: check NM_CONTROLLED after sourcing the device conf file
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
a8c3002082
commit
93397b69a2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user