summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-07-18 13:45:09 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-08-04 13:35:54 +0000
commita5a9eb2f858791fcecbc9ae54dc77cfb1bd6e7f3 (patch)
tree9ecf1704052b4d0d762b32f205270b8d7a01130a /lib
parentAdding host system based overlay mounts. (diff)
downloadcompute-tools-a5a9eb2f858791fcecbc9ae54dc77cfb1bd6e7f3.tar.xz
compute-tools-a5a9eb2f858791fcecbc9ae54dc77cfb1bd6e7f3.zip
Adding error message in container start command if container is locked.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'lib')
-rwxr-xr-xlib/container/start6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/container/start b/lib/container/start
index d5bbbf4..7e11121 100755
--- a/lib/container/start
+++ b/lib/container/start
@@ -107,6 +107,12 @@ case "${START}" in
;;
esac
+if [ -e "${MACHINES}/.#${NAME}.lck" ]
+then
+ echo "'${NAME}': container is locked" >&2
+ exit 1
+fi
+
HOST_ARCHITECTURE="$(dpkg --print-architecture)"
MACHINE_ARCHITECTURE="$(chroot ${MACHINES}/${NAME} dpkg --print-architecture)"