summaryrefslogtreecommitdiffstats
path: root/share/scripts
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
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')
-rwxr-xr-xshare/scripts/debconf27
-rwxr-xr-xshare/scripts/debconf.d/0003-debconf21
-rwxr-xr-xshare/scripts/debootstrap2
3 files changed, 42 insertions, 8 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" \
diff --git a/share/scripts/debconf.d/0003-debconf b/share/scripts/debconf.d/0003-debconf
index c5925f2..dc2db47 100755
--- a/share/scripts/debconf.d/0003-debconf
+++ b/share/scripts/debconf.d/0003-debconf
@@ -53,18 +53,18 @@ Distribution ()
then
case "${MODE}" in
debian)
- db_subst container/distribution CHOICES "Debian GNU/Linux 9 \"stretch\", Debian GNU/Linux 10 \"buster\", Debian GNU/Linux testing/bullseye, Debian GNU/Linux unstable/sid"
+ db_subst container/distribution CHOICES "Debian GNU/Linux 9 \"stretch\", Debian GNU/Linux 10 \"buster\", Debian GNU/Linux 11 \"bullseye\", Debian GNU/Linux unstable/sid"
db_subst container/distribution CHOICES_C "stretch, buster, bullseye, sid"
- db_set container/distribution buster
+ db_set container/distribution bullseye
db_fset container/distribution seen false
;;
progress-linux)
- db_subst container/distribution CHOICES "Progress Linux 5 (engywuck), Progress Linux 5+ (engywuck-backports)"
- db_subst container/distribution CHOICES_C "engywuck, engywuck-backports"
+ db_subst container/distribution CHOICES "Progress Linux 5 (engywuck), Progress Linux 5+ (engywuck-backports), Progress Linux 6 (fuchur), Progress Linux 6+ (fuchur-backports)"
+ db_subst container/distribution CHOICES_C "engywuck, engywuck-backports, fuchur, fuchur-backports"
- db_set container/distribution engywuck-backports
+ db_set container/distribution fuchur-backports
db_fset container/distribution seen false
;;
esac
@@ -94,6 +94,10 @@ Parent_distribution ()
engywuck*)
PARENT_DISTRIBUTION="buster"
;;
+
+ fuchur*)
+ PARENT_DISTRIBUTION="bullseye"
+ ;;
esac
;;
@@ -1242,6 +1246,13 @@ Internal_options ()
fi
echo "CNT_OVERLAY=\"${CNT_OVERLAY}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+
+ if db_get container/overlay-options
+ then
+ CNT_OVERLAY_OPTIONS="${RET}" # string (w/ empty)
+ fi
+
+ echo "CNT_OVERLAY_OPTIONS=\"${CNT_OVERLAY_OPTIONS}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
}
Mode
diff --git a/share/scripts/debootstrap b/share/scripts/debootstrap
index f69d006..0130b72 100755
--- a/share/scripts/debootstrap
+++ b/share/scripts/debootstrap
@@ -153,7 +153,7 @@ then
fi
ARCHITECTURE="${ARCHITECTURE:-$(dpkg --print-architecture)}"
-DISTRIBUTION="${DISTRIBUTION:-buster}"
+DISTRIBUTION="${DISTRIBUTION:-bullseye}"
MIRROR="${MIRROR:-https://deb.debian.org/debian}"
PASSWORD="${PASSWORD:-$(dd if=/dev/urandom bs=12 count=1 2> /dev/null | base64)}"