diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-05-27 18:57:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-05-27 18:57:08 +0000 |
commit | 34f9dde6d7bc82cef01eb7b3ab001f3e058782f2 (patch) | |
tree | bebd390e420aa1556459c192836e271417411273 /lib/container/start | |
parent | Adding upstream version 20180503. (diff) | |
download | open-infrastructure-compute-tools-34f9dde6d7bc82cef01eb7b3ab001f3e058782f2.tar.xz open-infrastructure-compute-tools-34f9dde6d7bc82cef01eb7b3ab001f3e058782f2.zip |
Adding upstream version 20180527.upstream/20180527
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/container/start')
-rwxr-xr-x | lib/container/start | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/container/start b/lib/container/start index e4b2ee6..62fb926 100755 --- a/lib/container/start +++ b/lib/container/start @@ -31,6 +31,8 @@ SYSTEMCTL="true" Parameters () { + OPTIONS_ALL="" + GETOPT_LONGOPTIONS="name:,force,nspawn,start," GETOPT_OPTIONS="n:f," @@ -55,6 +57,8 @@ Parameters () -f|--force) FORCE="true" shift 1 + + OPTIONS_ALL="${OPTIONS_ALL} --force" ;; --nspawn) @@ -96,6 +100,19 @@ then Usage fi +case "${NAME}" in + ALL) + NAMES="$(container list --format shell --stopped)" + + for NAME in ${NAMES} + do + container start --name ${NAME} ${OPTIONS_ALL} || true + done + + exit 0 + ;; +esac + if [ ! -e "${MACHINES}/${NAME}" ] then echo "'${NAME}': no such container" >&2 |