link executor: Delete dummy interface in post-down.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
This commit is contained in:
Maximilian Wilhelm 2020-08-30 22:38:58 +02:00
parent 7d81ceb898
commit e854819e8f

View file

@ -71,6 +71,13 @@ up|down)
${MOCK} ip link set $PHASE dev $IFACE $IF_LINK_OPTIONS ${MOCK} ip link set $PHASE dev $IFACE $IF_LINK_OPTIONS
;; ;;
post-down)
if [ "${IF_LINK_TYPE}" = "dummy" ]; then
if [ -d "/sys/class/net/${IFACE}" ]; then
ip link del "${IFACE}"
fi
fi
;;
depend) depend)
if is_vlan; then if is_vlan; then
echo "$IF_VLAN_RAW_DEVICE" echo "$IF_VLAN_RAW_DEVICE"