diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2016-05-18 17:12:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2016-05-18 18:26:09 +0000 |
commit | 6f55e12211049f8b6145f4ebbdd441aed00483e9 (patch) | |
tree | ca1f12c392f77d59a596e568e6d404c35c6bf765 /bin/container-autostart | |
parent | Adding veth field in debconf cairon-backports example preseed file. (diff) | |
download | compute-tools-6f55e12211049f8b6145f4ebbdd441aed00483e9.tar.xz compute-tools-6f55e12211049f8b6145f4ebbdd441aed00483e9.zip |
Removing screen session handling in container-autostart program, containers start in background by default now.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-x | bin/container-autostart | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/bin/container-autostart b/bin/container-autostart index 92e2383..cf4fec1 100755 --- a/bin/container-autostart +++ b/bin/container-autostart @@ -18,30 +18,14 @@ set -e -if [ ! -x /usr/bin/screen ] -then - echo "'${NAME}': /usr/bin/screen - no such file." >&2 - exit 1 -fi - HOST="$(hostname -f)" -HOME="${HOME:-/root}" -SHELL="/bin/bash" -export HOME SHELL - -cd "${HOME}" - -#screen -S container -A -d -m -t cnt bash -cl "cntsh && bash -l" -screen -S container -A -d -m -t cnt bash -l - for CONFIG in /etc/container-tools/config/*.conf do if grep -Eqs "^ *cnt.autostart=true" "${CONFIG}" || grep -Eqs "^ *cnt.autostart=${HOST}" "${CONFIG}" then CONTAINER="$(basename ${CONFIG} .conf)" - TITLE="$(echo ${CONTAINER} | awk -F. '{ print $1 }')" - screen -S container -X screen -t ${TITLE} bash -cl "cnt start -n ${CONTAINER} && bash -l" + cnt start -n ${CONTAINER} fi done |