From 0206529e4be9ff8df0511133e13f71c943de2172 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2019 15:53:37 +0200 Subject: Removing stray veth links when starting containers with force. Signed-off-by: Daniel Baumann --- lib/container/start | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/container/start b/lib/container/start index d5e9059..47c2907 100755 --- a/lib/container/start +++ b/lib/container/start @@ -144,6 +144,13 @@ then case "${FORCE}" in true) rm -f "${MACHINES}/.#${NAME}.lck" + + VETHS="$(awk -F= '/^network-veth-extra=/ { print $2 }' ${CONFIG}/${NAME}.conf | awk -F: '{ print $1 }')" + + for VETH in ${VETHS} + do + ip link delete ${VETH} > /dev/null 2>&1 || true + done ;; *) -- cgit v1.2.3