diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/container/stop | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/container/stop b/lib/container/stop index 3a0de2a..350d9e6 100755 --- a/lib/container/stop +++ b/lib/container/stop @@ -255,6 +255,17 @@ esac # Run machinectl ${MODE} ${NAME} +case "${FORCE}" in + true) + 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 + ;; +esac + # Post hooks for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}" do |