From d20488bf42c82f24edea6223ae9100936fa8d80b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 29 Jun 2017 11:01:49 +0200 Subject: Allow cnt.auto=force-true to enforce startup of a locked container at system startup. Use case: start specific containers automatically after e.g. a power loss of the container server. Signed-off-by: Daniel Baumann --- lib/container/auto | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/container/auto b/lib/container/auto index dba868e..cbacad2 100755 --- a/lib/container/auto +++ b/lib/container/auto @@ -104,7 +104,12 @@ esac for FILE in "${CONFIG}"/*.conf do - if grep -Eqs "^ *cnt.auto=true" "${FILE}" && grep -Eqs "^ *cnt.container-server=${HOST}" "${FILE}" + if grep -Eqs "^ *cnt.auto=force-true" "${FILE}" + then + OPTIONS="${OPTIONS} -f" + fi + + if grep -Eqs "^ *cnt.auto=(force-true|true)" "${FILE}" && grep -Eqs "^ *cnt.container-server=${HOST}" "${FILE}" then CONTAINER="$(basename ${FILE} .conf)" -- cgit v1.2.3