summaryrefslogtreecommitdiffstats
path: root/share/scripts/debconf.d
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xshare/scripts/debconf.d/0001-preseed-file9
1 files changed, 9 insertions, 0 deletions
diff --git a/share/scripts/debconf.d/0001-preseed-file b/share/scripts/debconf.d/0001-preseed-file
index 804f328..02dd72d 100755
--- a/share/scripts/debconf.d/0001-preseed-file
+++ b/share/scripts/debconf.d/0001-preseed-file
@@ -38,6 +38,15 @@ then
# available on the system matching the container name
db_set cnt-debconf/preseed-file "${CONFIG}/${NAME}.cfg"
db_fset cnt-debconf/preseed-file seen true
+elif [ "$(ls ${CONFIG}/*/${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/container-tools/debconf
+
+ FILE="$(ls ${CONFIG}/*/${NAME}.cfg)"
+
+ db_set cnt-debconf/preseed-file "${FILE}"
+ db_fset cnt-debconf/preseed-file seen true
elif [ -e "${CONFIG}/default.cfg" ]
then
# user did not specify a pressed file, but there is a default one