diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2017-06-29 09:01:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2017-06-29 09:12:26 +0000 |
commit | d20488bf42c82f24edea6223ae9100936fa8d80b (patch) | |
tree | 420c0a65bc4e2ef226ca8e7009010a218e7bd575 /lib/container/auto | |
parent | Harmonizing edition of container configuration file in debconf script. (diff) | |
download | compute-tools-d20488bf42c82f24edea6223ae9100936fa8d80b.tar.xz compute-tools-d20488bf42c82f24edea6223ae9100936fa8d80b.zip |
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 <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'lib/container/auto')
-rwxr-xr-x | lib/container/auto | 7 |
1 files changed, 6 insertions, 1 deletions
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)" |