From c6faf452b9fb84d7cf61df02ddcd169d337441e1 Mon Sep 17 00:00:00 2001 From: Maximilian Wilhelm Date: Fri, 2 Oct 2020 02:29:04 +0200 Subject: [PATCH 1/2] link executor: Don't complain about a vanished interface when downing it Signed-off-by: Maximilian Wilhelm --- executor-scripts/linux/link | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/executor-scripts/linux/link b/executor-scripts/linux/link index 02633ef..7ede189 100755 --- a/executor-scripts/linux/link +++ b/executor-scripts/linux/link @@ -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) From fef7c55270e990094f617f37c62afd8c289d9279 Mon Sep 17 00:00:00 2001 From: Maximilian Wilhelm Date: Fri, 2 Oct 2020 02:29:39 +0200 Subject: [PATCH 2/2] link exectutor: Don't re-create dummy interface when present. Signed-off-by: Maximilian Wilhelm --- executor-scripts/linux/link | 2 ++ 1 file changed, 2 insertions(+) diff --git a/executor-scripts/linux/link b/executor-scripts/linux/link index 7ede189..9df5294 100755 --- a/executor-scripts/linux/link +++ b/executor-scripts/linux/link @@ -36,6 +36,8 @@ create) echo "Interface ${IFACE} exists but is of type ${iface_type} instead of dummy" exit 1 fi + + exit 0 fi ${MOCK} ip link add "${IFACE}" type dummy