From 4abccc2c18bcc237324071298c0f6c75e14ef7c0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 9 Feb 2021 17:18:31 +0100 Subject: Merging upstream version 20210101. Signed-off-by: Daniel Baumann --- lib/container/remove | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'lib/container/remove') diff --git a/lib/container/remove b/lib/container/remove index 820e45e..75ebd60 100755 --- a/lib/container/remove +++ b/lib/container/remove @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2014-2020 Daniel Baumann +# Copyright (C) 2014-2021 Daniel Baumann # # SPDX-License-Identifier: GPL-3.0+ # @@ -126,12 +126,6 @@ case "${NAME}" in for NAME in ${NAMES} do - case "${VERBOSE}" in - true) - echo "Removing container ${NAME}..." - ;; - esac - ${PROGRAM} remove --name ${NAME} ${OPTIONS_ALL} || true done @@ -238,9 +232,21 @@ then fi # Run +case "${VERBOSE}" in + true) + echo -n "Removing container ${NAME}..." + ;; +esac + rm --preserve-root --one-file-system -rf ${RM_OPTIONS} "${MACHINES}/${NAME}" rm -f ${RM_OPTIONS} "${CONFIG}/${NAME}.conf" +case "${VERBOSE}" in + true) + echo " done." + ;; +esac + # Post hooks for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}" do -- cgit v1.2.3