summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Kunz <david.kunz@open-infrastructure.net>2017-01-05 07:50:48 +0000
committerDavid Kunz <david.kunz@open-infrastructure.net>2017-01-05 07:50:48 +0000
commitb5869b6c422d744c61ec0b0a85f425627e6d6a7c (patch)
treeb9888efa85db8512d84d24bca4c26e472c320f91
parentChange update-config (diff)
downloadcompute-tools-b5869b6c422d744c61ec0b0a85f425627e6d6a7c.tar.xz
compute-tools-b5869b6c422d744c61ec0b0a85f425627e6d6a7c.zip
Neutralization config-update.
-rwxr-xr-xlib/container/config-update22
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/container/config-update b/lib/container/config-update
index b76e369..482eab6 100755
--- a/lib/container/config-update
+++ b/lib/container/config-update
@@ -35,18 +35,26 @@ do
CNT_NETWORK_BRIDGE="veth-${NET}-${IP}:${BRIDGE}"
CNT_OVERLAY="$(awk -F= '/^cnt.overlay=/ { print $2 }' ${FILE})"
+
BIND="$(awk -F= '/^bind=/ { print $2 }' ${FILE})"
- BOOT="yes"
- CAPABILITY=""
+ BIND="${BIND:-bind=/srv/data/${CONTAINER}:/srv/${CONTAINER};}"
+
+ BOOT="$(awk -F= '/^boot=/ { print $2 }' ${FILE})"
+ CAPABILITY="$(awk -F= '/^capability=/ { print $2 }' ${FILE})"
DIRECTORY="/var/lib/machines/${CONTAINER}"
- DROP_CAPABILITY=""
- LINK_JOURNAL="no"
+ DROP_CAPABILITY="$(awk -F= '/^drop-capability=/ { print $2 }' ${FILE})"
+
+ LINK_JOURNAL="$(awk -F= '/^link-journal=/ { print $2 }' ${FILE})"
+ LINK_JOURNAL="${LINK_JOURNAL:-no}"
+
MACHINE="${CONTAINER}"
NETWORK_VETH_EXTRA="veth-${NET}-${IP}:eth0"
- PRIVATE_USERS="no"
- REGISTER="yes"
- BIND="${BIND:-bind=/srv/data/${CONTAINER}:/srv/${CONTAINER};}"
+ PRIVATE_USERS="$(awk -F= '/^private-users=/ { print $2 }' ${FILE})"
+ PRIVATE_USERS="${PRIVATE_USERS:-no}"
+
+ REGISTER="$(awk -F= '/^register=/ { print $2 }' ${FILE})"
+ REGISTER="${REGISTER:-yes}"
cat > ${FILE}-new << EOF
# container-tools: ${CONTAINER}