summaryrefslogtreecommitdiffstats
path: root/lib/container/remove
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2020-10-30 16:37:56 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2020-10-30 16:38:22 +0000
commit9005f8a27ffc7bff682b0e627eeaa76ef5bf95fb (patch)
tree49772d4fd9bf8ae7819e0244fd7289573c729448 /lib/container/remove
parentAdding container run command to execute programs within containers. (diff)
downloadcompute-tools-9005f8a27ffc7bff682b0e627eeaa76ef5bf95fb.tar.xz
compute-tools-9005f8a27ffc7bff682b0e627eeaa76ef5bf95fb.zip
Cleaning up and harmonizing verbose output for container remove, restart, start, and stop commands.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'lib/container/remove')
-rwxr-xr-xlib/container/remove18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/container/remove b/lib/container/remove
index 820e45e..3ee7195 100755
--- a/lib/container/remove
+++ b/lib/container/remove
@@ -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