diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2016-07-31 18:33:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2016-08-04 13:35:55 +0000 |
commit | 1f14719cada8aaa7d52352b7a9852fd8a65daec0 (patch) | |
tree | 36c9a30a879b128e0f0fb548b002a717b051b7d2 /lib/container | |
parent | Calling container-nsenter program from container enter command. (diff) | |
download | compute-tools-1f14719cada8aaa7d52352b7a9852fd8a65daec0.tar.xz compute-tools-1f14719cada8aaa7d52352b7a9852fd8a65daec0.zip |
Sorting container configuration file.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'lib/container')
-rwxr-xr-x | lib/container/create | 2 | ||||
-rwxr-xr-x | lib/container/start | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/lib/container/create b/lib/container/create index d1ef901..2d66436 100755 --- a/lib/container/create +++ b/lib/container/create @@ -185,9 +185,9 @@ sed -e "s|@CNT_AUTO@|${CNT_AUTO}|g" \ -e "s|@CAPABILITY@|${CAPABILITY}|g" \ -e "s|@DIRECTORY@|${MACHINES}/${NAME}|g" \ -e "s|@DROP_CAPABILITY@|${DROP_CAPABILITY}|g" \ + -e "s|@LINK_JOURNAL@|no|g" \ -e "s|@MACHINE@|${NAME}|g" \ -e "s|@NETWORK_VETH_EXTRA@|${NETWORK_VETH_EXTRA}|g" \ - -e "s|@LINK_JOURNAL@|no|g" \ -e "s|@REGISTER@|yes|g" \ /usr/share/container-tools/config/container.conf.in > "${CONFIG}/${NAME}.conf" diff --git a/lib/container/start b/lib/container/start index b8803b2..41e8f72 100755 --- a/lib/container/start +++ b/lib/container/start @@ -243,6 +243,18 @@ then ;; esac + LINK_JOURNAL="$(awk -F= '/^link-journal=/ { print $2 }' ${CONFIG}/${NAME}.conf || echo no)" + + case "${LINK_JOURNAL}" in + yes) + LINK_JOURNAL="--link-journal=yes" + ;; + + *) + LINK_JOURNAL="--link-journal=no" + ;; + esac + MACHINE="--machine=${NAME}" NETWORK_VETH_EXTRA_CONF="$(awk -F= '/^network-veth-extra=/ { print $2 }' ${CONFIG}/${NAME}.conf)" @@ -300,18 +312,6 @@ EOF ;; esac - LINK_JOURNAL="$(awk -F= '/^link-journal=/ { print $2 }' ${CONFIG}/${NAME}.conf || echo no)" - - case "${LINK_JOURNAL}" in - yes) - LINK_JOURNAL="--link-journal=yes" - ;; - - *) - LINK_JOURNAL="--link-journal=no" - ;; - esac - REGISTER="$(awk -F= '/^register=/ { print $2 }' ${CONFIG}/${NAME}.conf || echo yes)" case "${REGISTER}" in |