summaryrefslogtreecommitdiffstats
path: root/lib/container/start
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/start
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 '')
-rwxr-xr-xlib/container/start22
1 files changed, 16 insertions, 6 deletions
diff --git a/lib/container/start b/lib/container/start
index 6309fb1..52d7ceb 100755
--- a/lib/container/start
+++ b/lib/container/start
@@ -77,6 +77,9 @@ Parameters ()
-v|--verbose)
VERBOSE="true"
+ shift 1
+
+ OPTIONS_ALL="${OPTIONS_ALL} --verbose"
;;
--)
@@ -114,12 +117,6 @@ case "${NAME}" in
for NAME in ${NAMES}
do
- case "${VERBOSE}" in
- true)
- echo "Starting container ${NAME}..."
- ;;
- esac
-
${PROGRAM} start --name ${NAME} ${OPTIONS_ALL} || true
done
@@ -516,6 +513,19 @@ case "${START}" in
*)
# Run
+
+ case "${VERBOSE}" in
+ true)
+ echo -n "Starting container ${NAME}..."
+ ;;
+ esac
+
${SETARCH} systemd-nspawn --keep-unit ${BIND} ${BIND_RO} ${BOOT} ${CAPABILITY} ${DIRECTORY} ${DROP_CAPABILITY} ${MACHINE} ${NETWORK_VETH_EXTRA} ${LINK_JOURNAL} ${REGISTER}
+
+ case "${VERBOSE}" in
+ true)
+ echo " done."
+ ;;
+ esac
;;
esac