summaryrefslogtreecommitdiffstats
path: root/lib/container/config-update
diff options
context:
space:
mode:
authorDavid Kunz <david.kunz@open-infrastructure.net>2017-01-05 11:46:32 +0000
committerDavid Kunz <david.kunz@open-infrastructure.net>2017-01-05 11:46:32 +0000
commit12f3ac5e058ecacd3460a32b7fb5f82ed7667071 (patch)
treeb0a521da3fdf88f916843831bdf450b67a960aee /lib/container/config-update
parentNeutralization config-update. (diff)
downloadcompute-tools-12f3ac5e058ecacd3460a32b7fb5f82ed7667071.tar.xz
compute-tools-12f3ac5e058ecacd3460a32b7fb5f82ed7667071.zip
Add check if exist config-new in config-update.
Diffstat (limited to 'lib/container/config-update')
-rwxr-xr-xlib/container/config-update13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/container/config-update b/lib/container/config-update
index 2679e6e..772da23 100755
--- a/lib/container/config-update
+++ b/lib/container/config-update
@@ -26,9 +26,9 @@ for FILE in "${CONFIG}"/*.conf
do
CONTAINER="$(basename ${FILE} .conf)"
- NET="$(dig +short ${CONTAINER} | awk -F. '{ print $3 }')"
- IP="$(dig +short ${CONTAINER} | awk -F. '{ print $4 }')"
- BRIDGE="$(awk -F: '/^cnt.network-brige=/ { print $2 }' ${FILE})"
+ NET="$(dig @8.8.8.8 +short ${CONTAINER} | awk -F. '{ print $3 }')"
+ IP="$(dig @8.8.8.8 +short ${CONTAINER} | awk -F. '{ print $4 }')"
+ BRIDGE="$(awk -F: '/^cnt.network-bridge=/ { print $2 }' ${FILE})"
CNT_AUTO="$(awk -F= '/^cnt.auto=/ { print $2 }' ${FILE})"
CNT_AUTO="${CNT_AUTO:-FIXME}"
@@ -37,7 +37,7 @@ do
CNT_OVERLAY="$(awk -F= '/^cnt.overlay=/ { print $2 }' ${FILE})"
BIND="$(awk -F= '/^bind=/ { print $2 }' ${FILE})"
- BIND="${BIND:-bind=/srv/data/${CONTAINER}:/srv/${CONTAINER};}"
+ BIND="${BIND:-/srv/data/${CONTAINER}:/srv/${CONTAINER};}"
BOOT="$(awk -F= '/^boot=/ { print $2 }' ${FILE})"
CAPABILITY="$(awk -F= '/^capability=/ { print $2 }' ${FILE})"
@@ -83,6 +83,11 @@ echo " done."
for FILE in "${CONFIG}"/*.conf-new
do
+ if [ ! -e "${CONFIG}/$(basename ${FILE} -new)" ]
+ then
+ continue
+ fi
+
clear
echo "diff -Naurp ${CONFIG}/$(basename ${FILE} -new) ${FILE}"