link executor: Make vlan disposal MOCKable again
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
This commit is contained in:
parent
58f010fe91
commit
37a7d8f097
1 changed files with 5 additions and 3 deletions
|
@ -77,10 +77,12 @@ down)
|
||||||
${MOCK} ip link set down dev "${IFACE}"
|
${MOCK} ip link set down dev "${IFACE}"
|
||||||
;;
|
;;
|
||||||
post-down)
|
post-down)
|
||||||
if [ "${IF_LINK_TYPE}" = "dummy" -o is_vlan ]; then
|
if [ "${IF_LINK_TYPE}" = "dummy" ] || is_vlan; then
|
||||||
if [ -d "/sys/class/net/${IFACE}" ]; then
|
if [ -z "${MOCK}" -a ! -d "/sys/class/net/${IFACE}" ]; then
|
||||||
ip link del "${IFACE}"
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ip link del "${IFACE}"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
depend)
|
depend)
|
||||||
|
|
Loading…
Reference in a new issue