link executor: Don't complain about a vanished interface when downing it

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
This commit is contained in:
Maximilian Wilhelm 2020-10-02 02:29:04 +02:00
parent 044d8307f9
commit c6faf452b9

View file

@ -74,6 +74,11 @@ up)
fi
;;
down)
# Don't complain about a vanished interface when downing it
if [ -z "${MOCK}" -a ! -d "/sys/class/net/${IFACE}" ]; then
exit 0
fi
${MOCK} ip link set down dev "${IFACE}"
;;
destroy)