From 1f14719cada8aaa7d52352b7a9852fd8a65daec0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 31 Jul 2016 20:33:58 +0200 Subject: Sorting container configuration file. Signed-off-by: Daniel Baumann --- lib/container/create | 2 +- lib/container/start | 24 ++++++++++++------------ share/config/container.conf.in | 2 +- 3 files changed, 14 insertions(+), 14 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 diff --git a/share/config/container.conf.in b/share/config/container.conf.in index b0211af..5a0b7cf 100644 --- a/share/config/container.conf.in +++ b/share/config/container.conf.in @@ -9,9 +9,9 @@ boot=@BOOT@ capability=@CAPABILITY@ directory=@DIRECTORY@ drop-capability=@DROP_CAPABILITY@ +link-journal=@LINK_JOURNAL@ machine=@MACHINE@ network-veth-extra=@NETWORK_VETH_EXTRA@ -link-journal=@LINK_JOURNAL@ register=@REGISTER@ [limit] -- cgit v1.2.3