summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2018-02-18 15:03:05 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2018-02-18 15:05:07 +0000
commitf37df2683267b9fb757e63e1325b01ca65a7a599 (patch)
treece9966219d24c1e58472323939a986fb2db953ab /share
parentMaking pre-create.git-pull.sh hook to be aware of multiple subdirectories bel... (diff)
downloadcompute-tools-f37df2683267b9fb757e63e1325b01ca65a7a599.tar.xz
compute-tools-f37df2683267b9fb757e63e1325b01ca65a7a599.zip
Making container debconf create script aware of multiple subdirectories below /etc/container-tools/debconf when showing the list of preseed files to the user.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-xshare/scripts/debconf.d/0001-preseed-file4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/scripts/debconf.d/0001-preseed-file b/share/scripts/debconf.d/0001-preseed-file
index 0f68622..804f328 100755
--- a/share/scripts/debconf.d/0001-preseed-file
+++ b/share/scripts/debconf.d/0001-preseed-file
@@ -43,13 +43,13 @@ then
# user did not specify a pressed file, but there is a default one
db_set cnt-debconf/preseed-file "${CONFIG}/default.cfg"
db_fset cnt-debconf/preseed-file seen true
-elif ls "${CONFIG}"/*.cfg > /dev/null 2>&1
+elif ls "${CONFIG}"/*.cfg > /dev/null 2>&1 || ls "${CONFIG}"/*/*.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' | sort)"
- PRESEED_FILES="$(for FILE in ${FILES}; do echo -n "$(basename ${FILE} .cfg), "; done | sed -e 's|, $||')"
+ PRESEED_FILES="$(for FILE in ${FILES}; do echo -n "$(echo ${FILE} | sed -e 's|.cfg$||'), "; done | sed -e 's|, $||')"
if [ -n "${PRESEED_FILES}" ]
then