summaryrefslogtreecommitdiffstats
path: root/share/build-scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2022-05-08 15:25:38 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2022-05-08 15:25:38 +0000
commit1ea974603fb43cee3466161ab7de270ecac81242 (patch)
tree3a190b9276f8c7dceb31f344b6ddf6a4fa56a24a /share/build-scripts
parentExcluding /etc/compute-tools/debconf/links from being shown in preseed file s... (diff)
downloadcompute-tools-1ea974603fb43cee3466161ab7de270ecac81242.tar.xz
compute-tools-1ea974603fb43cee3466161ab7de270ecac81242.zip
Explicitly prefering links subdirectory over other locations withint debconf hierarchy in debconf build scripts.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-xshare/build-scripts/debconf.d/0001-preseed-file13
1 files changed, 10 insertions, 3 deletions
diff --git a/share/build-scripts/debconf.d/0001-preseed-file b/share/build-scripts/debconf.d/0001-preseed-file
index 082958e..8e90943 100755
--- a/share/build-scripts/debconf.d/0001-preseed-file
+++ b/share/build-scripts/debconf.d/0001-preseed-file
@@ -35,9 +35,10 @@ export DEBCONF_NOWARNINGS
#
# 1. user specified a preseed file through commandline options
# 2. /etc/compute-tools/debconf/${NAME}.cfg exists
-# 3. /etc/compute-tools/debconf/*/${NAME}.cfg exists (only one file!)
-# 4. /etc/compute-tools/debconf/default.cfg exists
-# 5. user chooses from list of available (if any) *.cfg files
+# 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.
@@ -52,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)