summaryrefslogtreecommitdiffstats
path: root/share/scripts/debconf
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2020-10-30 04:13:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2020-10-30 04:13:05 +0000
commitd1c2a7be1249a4fe1e411a8140ce646f97906859 (patch)
tree1911ababde72f2b89a8fb559d3c1def046525926 /share/scripts/debconf
parentAdding upstream version 20200830. (diff)
downloadopen-infrastructure-compute-tools-d1c2a7be1249a4fe1e411a8140ce646f97906859.tar.xz
open-infrastructure-compute-tools-d1c2a7be1249a4fe1e411a8140ce646f97906859.zip
Adding upstream version 20201030.upstream/20201030
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/scripts/debconf')
-rwxr-xr-xshare/scripts/debconf27
1 files changed, 25 insertions, 2 deletions
diff --git a/share/scripts/debconf b/share/scripts/debconf
index 197791a..be0fae0 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -167,6 +167,7 @@ Mount ()
then
CNT_OVERLAYS="$(echo ${CNT_OVERLAY} | sed -e 's|;| |g')"
+ COUNT="0"
for CNT_OVERLAY in ${CNT_OVERLAYS}
do
DIRECTORY_LOWER="$(echo ${CNT_OVERLAY} | awk -F: '{ print $1 }')"
@@ -174,12 +175,23 @@ Mount ()
DIRECTORY_WORK="$(echo ${CNT_OVERLAY} | awk -F: '{ print $3 }')"
DIRECTORY_MERGED="$(echo ${CNT_OVERLAY} | awk -F: '{ print $4 }')"
+ COUNT="$((${COUNT} + 1))"
+ CNT_OVERLAY_OPTION="$(echo ${CNT_OVERLAY_OPTIONS} | awk -F ';' "{ print \$${COUNT} }")"
+
for DIRECTORY in "${DIRECTORY_LOWER}" "${DIRECTORY_UPPER}" "${DIRECTORY_WORK}" "${DIRECTORY_MERGED}"
do
mkdir -p "${DIRECTORY}"
done
- mount -t overlay overlay-${NAME} -olowerdir="${DIRECTORY_LOWER}",upperdir="${DIRECTORY_UPPER}",workdir="${DIRECTORY_WORK}" "${DIRECTORY_MERGED}"
+ if ! findmnt -n -o SOURCE "${DIRECTORY_MERGED}" | grep -qs '^overlay-'
+ then
+ if [ -n "${CNT_OVERLAY_OPTION}" ]
+ then
+ CNT_OVERLAY_OPTION="-o ${CNT_OVERLAY_OPTION}"
+ fi
+
+ mount -t overlay overlay-${NAME} ${CNT_OVERLAY_OPTION} -olowerdir="${DIRECTORY_LOWER}",upperdir="${DIRECTORY_UPPER}",workdir="${DIRECTORY_WORK}" "${DIRECTORY_MERGED}"
+ fi
done
fi
}
@@ -205,6 +217,12 @@ Umount ()
rmdir --ignore-fail-on-non-empty --parents ${DIRECTORY} > /dev/null 2>&1 || true
done
done
+
+ # empty workdir otherwise there might happen stale file handles
+ if [ -d "${DIRECTORY_WORK}" ]
+ then
+ rm --preserve-root --one-file-system -rf "${DIRECTORY_WORK}"/*
+ fi
fi
# Unmounting ro bind mounts
@@ -499,10 +517,14 @@ EOF
for PARENT_REPO in ${PARENT_ARCHIVES}
do
case "${PARENT_REPO}" in
- ${PARENT_DIST}-security)
+ buster-security)
echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DIST}/updates ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list"
;;
+ bullseye-security)
+ echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DIST}-security ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list"
+ ;;
+
${PARENT_DIST}-updates)
echo "deb ${PARENT_MIRROR} ${PARENT_DIST}-updates ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list"
;;
@@ -1014,6 +1036,7 @@ Commands ()
-e "s|^cnt.container-server=.*|cnt.container-server=${CNT_CONTAINER_SERVER}|g" \
-e "s|^cnt.network-bridge=.*|cnt.network-bridge=${HOST_INTERFACE_NAME}:${NETWORK1_BRIDGE:-bridge0}|g" \
-e "s|^cnt.overlay=.*|cnt.overlay=${CNT_OVERLAY}|g" \
+ -e "s|^cnt.overlay-options=.*|cnt.overlay-options=${CNT_OVERLAY_OPTIONS}|g" \
-e "s|^bind=.*|bind=${BIND}|g" \
-e "s|^bind-ro=.*|bind-ro=${BIND_RO}|g" \
-e "s|^network-veth-extra=.*|network-veth-extra=${HOST_INTERFACE_NAME}:eno1|g" \