diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2022-05-08 14:06:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2022-05-08 14:06:36 +0000 |
commit | bfc8b046366b0b5b42bd46552700c3de436f3cf8 (patch) | |
tree | 18e5b2f1323922fd33858eeccdb67cd2d190d829 | |
parent | Using versioned sort when sorting debconf templates. (diff) | |
download | compute-tools-bfc8b046366b0b5b42bd46552700c3de436f3cf8.tar.xz compute-tools-bfc8b046366b0b5b42bd46552700c3de436f3cf8.zip |
Excluding /etc/compute-tools/debconf/links from being shown in preseed file selection dialog to declutter automatization symlinks from real templates.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-x | share/build-scripts/debconf.d/0001-preseed-file | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/share/build-scripts/debconf.d/0001-preseed-file b/share/build-scripts/debconf.d/0001-preseed-file index c6bd54d..082958e 100755 --- a/share/build-scripts/debconf.d/0001-preseed-file +++ b/share/build-scripts/debconf.d/0001-preseed-file @@ -38,7 +38,8 @@ export DEBCONF_NOWARNINGS # 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 -# (recursively) found in /etc/compute-tools/debconf. +# (recursively) found in /etc/compute-tools/debconf, +# /etc/compute-tools/debconf/links is excluded. if [ -n "${PRESEED_FILE}" ] then @@ -70,7 +71,7 @@ then # user has not specified preseed files through commandline option, # showing debconf selection dialog for global preseed file. - FILES="$(cd ${DEBCONF} && find . -type f -name '*.cfg' -printf '%P\n' | LC_ALL=C sort -V)" + FILES="$(cd ${DEBCONF} && find . -type f -name '*.cfg' -printf '%P\n' | grep -v '^links\/' | LC_ALL=C sort -V)" PRESEED_FILES="$(for FILE in ${FILES}; do echo -n "$(echo ${FILE} | sed -e 's|.cfg$||'), "; done | sed -e 's|, $||')" if [ -n "${PRESEED_FILES}" ] |