diff options
-rw-r--r-- | CHANGELOG.txt | 11 | ||||
-rw-r--r-- | VERSION.txt | 2 | ||||
-rwxr-xr-x | libexec/container/start | 4 | ||||
-rwxr-xr-x | share/build-scripts/debconf.d/0001-preseed-file | 19 |
4 files changed, 32 insertions, 4 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6591c7c..06288b6 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,14 @@ +2022-05-08 Daniel Baumann <daniel.baumann@open-infrastructure.net> + + * Releasing version 20220508. + + [ Daniel Baumann ] + * Correcting off-by-one error when warning about too long veth interface names in container start commend. + * Adding comments about debconf hierarchy in debconf build script. + * Using versioned sort when sorting debconf templates. + * Excluding /etc/compute-tools/debconf/links from being shown in preseed file selection dialog to declutter automatization symlinks from real templates. + * Explicitly prefering links subdirectory over other locations withint debconf hierarchy in debconf build scripts. + 2022-05-05 Daniel Baumann <daniel.baumann@open-infrastructure.net> * Releasing version 20220505. diff --git a/VERSION.txt b/VERSION.txt index 75b32b6..f5a8b19 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -20220505 +20220508 diff --git a/libexec/container/start b/libexec/container/start index 1b53628..de6bd84 100755 --- a/libexec/container/start +++ b/libexec/container/start @@ -369,7 +369,7 @@ then NETWORK_VETH_EXTRA="${NETWORK_VETH_EXTRA} --network-veth-extra=${VETH}" INTERFACE="$(echo ${VETH} | awk -F: '{ print $1 }')" - if [ "$(echo ${INTERFACE} | wc -c)" -gt 15 ] + if [ "$(echo ${INTERFACE} | wc -c)" -gt 16 ] then echo "'${INTERFACE}': name exceeds maximum of 15 characters, network might be not working." fi @@ -389,7 +389,7 @@ then INTERFACE="$(echo ${BRIDGE_DEFINITION} | awk -F: '{ print $1 }')" BRIDGE="$(echo ${BRIDGE_DEFINITION} | awk -F: '{ print $2 }')" - if [ "$(echo ${INTERFACE} | wc -c)" -gt 15 ] + if [ "$(echo ${INTERFACE} | wc -c)" -gt 16 ] then echo "'${INTERFACE}': name exceeds maximum of 15 characters, network might be not working." fi diff --git a/share/build-scripts/debconf.d/0001-preseed-file b/share/build-scripts/debconf.d/0001-preseed-file index 8409486..8e90943 100755 --- a/share/build-scripts/debconf.d/0001-preseed-file +++ b/share/build-scripts/debconf.d/0001-preseed-file @@ -31,6 +31,17 @@ export DEBCONF_NOWARNINGS . /usr/share/debconf/confmodule +# debconf template hierarchy (first match wins): +# +# 1. user specified a preseed file through commandline options +# 2. /etc/compute-tools/debconf/${NAME}.cfg exists +# 3. /etc/compute-tools/debconf/links/${NAME}.cfg exists +# 4. /etc/compute-tools/debconf/*/${NAME}.cfg exists (only one file!) +# 5. /etc/compute-tools/debconf/default.cfg exists +# 6. user chooses from list of available (if any) *.cfg files +# (recursively) found in /etc/compute-tools/debconf, +# /etc/compute-tools/debconf/links is excluded. + if [ -n "${PRESEED_FILE}" ] then # user specified one or more preseed files through commandline option @@ -42,6 +53,12 @@ then # available on the system matching the container name db_set container/preseed-file "${DEBCONF}/${NAME}.cfg" db_fset container/preseed-file seen true +elif [ -e "${DEBCONF}/links/${NAME}.cfg" ] +then + # user did not specify a pressed file, but there is a matching one + # in /etc/${SOFTWARE}/debconf/links directory + db_set container/preseed-file "${DEBCONF}/${NAME}.cfg" + db_fset container/preseed-file seen true elif [ "$(ls ${DEBCONF}/*/${NAME}.cfg 2>/dev/null | wc -l)" -eq 1 ] then # user did not specify a pressed file, but there is 1 (and only 1) @@ -61,7 +78,7 @@ then # user has not specified preseed files through commandline option, # showing debconf selection dialog for global preseed file. - FILES="$(cd ${DEBCONF} && find . -type f -name '*.cfg' -printf '%P\n' | LC_ALL=C sort)" + FILES="$(cd ${DEBCONF} && find . -type f -name '*.cfg' -printf '%P\n' | grep -v '^links\/' | LC_ALL=C sort -V)" PRESEED_FILES="$(for FILE in ${FILES}; do echo -n "$(echo ${FILE} | sed -e 's|.cfg$||'), "; done | sed -e 's|, $||')" if [ -n "${PRESEED_FILES}" ] |