diff options
Diffstat (limited to 'share/scripts')
-rwxr-xr-x | share/scripts/debconf.d/0001-preseed-file | 11 |
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}" |