From 384a991b23fe765a2ed8249f1f3e73488ded9556 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 6 Jun 2021 07:52:09 +0200 Subject: 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 --- libexec/container/start | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libexec/container/start') 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 }')" -- cgit v1.2.3