diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-05-27 18:57:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-05-27 18:57:28 +0000 |
commit | ec02cf56078c58021d5fe33a738eb00cb0079f74 (patch) | |
tree | b36858f90ef583ac374fa75f4f531bb31c2350ef /lib/container/stop | |
parent | Releasing debian version 20180503-1. (diff) | |
download | open-infrastructure-compute-tools-ec02cf56078c58021d5fe33a738eb00cb0079f74.tar.xz open-infrastructure-compute-tools-ec02cf56078c58021d5fe33a738eb00cb0079f74.zip |
Merging upstream version 20180527.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/container/stop')
-rwxr-xr-x | lib/container/stop | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/container/stop b/lib/container/stop index 5099005..d996282 100755 --- a/lib/container/stop +++ b/lib/container/stop @@ -30,6 +30,8 @@ CLEAN="false" Parameters () { + OPTIONS_ALL="" + GETOPT_LONGOPTIONS="name:,force,clean," GETOPT_OPTIONS="n:,f," @@ -53,12 +55,17 @@ Parameters () -f|--force) FORCE="true" + shift 1 + + OPTIONS_ALL="${OPTIONS_ALL} --force" ;; --clean) # internal option CLEAN="true" shift 1 + + OPTONS_ALL="${OPTIONS_ALL} --clean" ;; --) @@ -108,6 +115,19 @@ then Usage fi +case "${NAME}" in + ALL) + NAMES="$(container list --format shell --started)" + + for NAME in ${NAMES} + do + container stop --name ${NAME} ${OPTIONS_ALL} || true + done + + exit 0 + ;; +esac + if [ ! -e "${MACHINES}/${NAME}" ] then echo "'${NAME}': no such container" >&2 |