summaryrefslogtreecommitdiffstats
path: root/libexec/container/start
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-06-06 05:52:09 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-06-06 05:57:52 +0000
commit384a991b23fe765a2ed8249f1f3e73488ded9556 (patch)
tree592fa7bf91a2b1ab6eeb53c5e6cd4f2f7043aca9 /libexec/container/start
parentRemoving undesirable --verbose option when calling mmdebstrap in debconf cont... (diff)
downloadcompute-tools-384a991b23fe765a2ed8249f1f3e73488ded9556.tar.xz
compute-tools-384a991b23fe765a2ed8249f1f3e73488ded9556.zip
Allowing to specify cnt.start=force in container config to ease fencing with pacemaker/corosync.
This should be generalized as a generic container program behaviour to look at users command line options *and* container configuration files. Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-xlibexec/container/start6
1 files changed, 6 insertions, 0 deletions
diff --git a/libexec/container/start b/libexec/container/start
index 089aa7d..08c3611 100755
--- a/libexec/container/start
+++ b/libexec/container/start
@@ -131,6 +131,12 @@ then
exit 1
fi
+# options
+if grep -Eqs "^ *cnt.start=" "${CONFIG}/${NAME}.conf" | grep -qs force
+then
+ FORCE="true"
+fi
+
case "${START}" in
false)
STATE="$(machinectl show ${NAME} 2>&1 | awk -FState= '/^State=/ { print $2 }')"