diff options
Diffstat (limited to 'lib/container')
-rwxr-xr-x | lib/container/config-update | 13 |
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}" |