summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2019-01-11 09:50:28 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2019-01-11 09:50:28 +0000
commita38799da244b3f9ec3bfa6ad4c2261dec0ceaee4 (patch)
tree99adf61bfb62f828bb684242a82956ff30146ecf
parentUpdating host-setup documentation for unpriviled containers. (diff)
downloadcompute-tools-tmp-bugfix-not-unique-cfg.tar.xz
compute-tools-tmp-bugfix-not-unique-cfg.zip
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
-rwxr-xr-xshare/scripts/debconf.d/0001-preseed-file11
1 files changed, 10 insertions, 1 deletions
diff --git a/share/scripts/debconf.d/0001-preseed-file b/share/scripts/debconf.d/0001-preseed-file
index 021dabf..281430a 100755
--- a/share/scripts/debconf.d/0001-preseed-file
+++ b/share/scripts/debconf.d/0001-preseed-file
@@ -38,11 +38,20 @@ 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 ]
+elif ls ${CONFIG}/*/${NAME}.cfg > /dev/null 2>&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
+ if [ "$(ls ${CONFIG}/*/${NAME}.cfg 2>/dev/null | wc -l)" -gt 1 ]
+ then
+ echo "'${NAME}': not unique, showing debconf selection"
+
+
+elif [ "$(ls ${CONFIG}/*/${NAME}.cfg 2>/dev/null | wc -l)" -eq 1 ]
+ # 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}"