summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-11-02 17:11:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-11-02 17:11:53 +0000
commit545a2e4cd11187082182ace2305d6561bde558b6 (patch)
tree4568cb02a070897f019ee599c1dd45e13ef5b348
parentReleasing debian version 20210804-3. (diff)
downloadopen-infrastructure-compute-tools-545a2e4cd11187082182ace2305d6561bde558b6.tar.xz
open-infrastructure-compute-tools-545a2e4cd11187082182ace2305d6561bde558b6.zip
Merging upstream version 20211102.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--CHANGELOG.txt10
-rw-r--r--VERSION.txt2
-rwxr-xr-xshare/build-scripts/debconf.d/0001-preseed-file30
3 files changed, 29 insertions, 13 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index c27b455..d607e02 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,13 @@
+2021-11-02 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20211102.
+
+ [ Daniel Baumann ]
+ * Adding 'exit' in debconf build script, thanks to Katharina.
+ * Sorting preseed-file options in debconf build script.
+ * Renaming internal config variable to more suitable debconf in debconf build script.
+ * Also removing config file stub when exiting debconf build script.
+
2021-08-04 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20210804.
diff --git a/VERSION.txt b/VERSION.txt
index 856144c..f8892a4 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-20210804
+20211102
diff --git a/share/build-scripts/debconf.d/0001-preseed-file b/share/build-scripts/debconf.d/0001-preseed-file
index d70e4e1..c1a311d 100755
--- a/share/build-scripts/debconf.d/0001-preseed-file
+++ b/share/build-scripts/debconf.d/0001-preseed-file
@@ -23,7 +23,8 @@ PROJECT="open-infrastructure"
SOFTWARE="compute-tools"
PROGRAM="container"
-CONFIG="/etc/${SOFTWARE}/debconf"
+CONFIG="/etc/${SOFTWARE}/config"
+DEBCONF="/etc/${SOFTWARE}/debconf"
DEBCONF_NOWARNINGS="true"
export DEBCONF_NOWARNINGS
@@ -35,37 +36,37 @@ then
# user specified one or more preseed files through commandline option
db_set container/preseed-file "${PRESEED_FILE}"
db_fset container/preseed-file seen true
-elif [ -e "${CONFIG}/${NAME}.cfg" ]
+elif [ -e "${DEBCONF}/${NAME}.cfg" ]
then
# user did not specify a pressed file, but there is a matching one
# available on the system matching the container name
- db_set container/preseed-file "${CONFIG}/${NAME}.cfg"
+ db_set container/preseed-file "${DEBCONF}/${NAME}.cfg"
db_fset container/preseed-file seen true
-elif [ "$(ls ${CONFIG}/*/${NAME}.cfg 2>/dev/null | wc -l)" -eq 1 ]
+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)
# matching in a sub-directory of /etc/${SOFTWARE}/debconf
- FILE="$(ls ${CONFIG}/*/${NAME}.cfg)"
+ FILE="$(ls ${DEBCONF}/*/${NAME}.cfg)"
db_set container/preseed-file "${FILE}"
db_fset container/preseed-file seen true
-elif [ -e "${CONFIG}/default.cfg" ]
+elif [ -e "${DEBCONF}/default.cfg" ]
then
# user did not specify a pressed file, but there is a default one
- db_set container/preseed-file "${CONFIG}/default.cfg"
+ db_set container/preseed-file "${DEBCONF}/default.cfg"
db_fset container/preseed-file seen true
-elif ls "${CONFIG}"/*.cfg > /dev/null 2>&1 || ls "${CONFIG}"/*/*.cfg > /dev/null 2>&1
+elif ls "${DEBCONF}"/*.cfg > /dev/null 2>&1 || ls "${DEBCONF}"/*/*.cfg > /dev/null 2>&1
then
# user has not specified preseed files through commandline option,
# showing debconf selection dialog for global preseed file.
- FILES="$(cd ${CONFIG} && find . -type f -name '*.cfg' -printf '%P\n' | LC_ALL=C sort)"
+ FILES="$(cd ${DEBCONF} && find . -type f -name '*.cfg' -printf '%P\n' | LC_ALL=C sort)"
PRESEED_FILES="$(for FILE in ${FILES}; do echo -n "$(echo ${FILE} | sed -e 's|.cfg$||'), "; done | sed -e 's|, $||')"
if [ -n "${PRESEED_FILES}" ]
then
- db_subst container/preseed-files CHOICES "none, custom, , ${PRESEED_FILES}"
+ db_subst container/preseed-files CHOICES "custom, exit, none, , ${PRESEED_FILES}"
db_settitle container/title
db_input high container/preseed-files || true
@@ -75,12 +76,17 @@ then
PRESEED_FILE="${RET}" # select
case "${PRESEED_FILE}" in
- none|custom)
+ custom|none)
+ ;;
+
+ exit)
+ rm -f "${CONFIG}/${NAME}.conf"
+ exit 1
;;
*)
# user specified preseed file through debconf select
- db_set container/preseed-file "${CONFIG}/${PRESEED_FILE}.cfg"
+ db_set container/preseed-file "${DEBCONF}/${PRESEED_FILE}.cfg"
db_fset container/preseed-file seen true
;;
esac