summaryrefslogtreecommitdiffstats
path: root/lib/container/remove
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-09 16:18:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-09 16:18:22 +0000
commitc011654fff348560957804ce4db060b8f1b40f89 (patch)
tree9065f9029812e692f8ed9c6d6696e58a624ff29c /lib/container/remove
parentAdding upstream version 20201030. (diff)
downloadopen-infrastructure-compute-tools-c011654fff348560957804ce4db060b8f1b40f89.tar.xz
open-infrastructure-compute-tools-c011654fff348560957804ce4db060b8f1b40f89.zip
Adding upstream version 20210101.upstream/20210101
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/container/remove')
-rwxr-xr-xlib/container/remove20
1 files changed, 13 insertions, 7 deletions
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 <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# 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