summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-11-02 14:23:50 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-11-02 16:55:22 +0000
commit56f043f67fcdb5dc478689787fa22b15f58e05a5 (patch)
treef6dfc3cffcb68474f8e383a2dec8587c7073f8db
parentSorting preseed-file options in debconf build script. (diff)
downloadcompute-tools-56f043f67fcdb5dc478689787fa22b15f58e05a5.tar.xz
compute-tools-56f043f67fcdb5dc478689787fa22b15f58e05a5.zip
Renaming internal config variable to more suitable debconf in debconf build script.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
-rwxr-xr-xshare/build-scripts/debconf.d/0001-preseed-file20
1 files changed, 10 insertions, 10 deletions
diff --git a/share/build-scripts/debconf.d/0001-preseed-file b/share/build-scripts/debconf.d/0001-preseed-file
index 78c10f0..33f5427 100755
--- a/share/build-scripts/debconf.d/0001-preseed-file
+++ b/share/build-scripts/debconf.d/0001-preseed-file
@@ -23,7 +23,7 @@ PROJECT="open-infrastructure"
SOFTWARE="compute-tools"
PROGRAM="container"
-CONFIG="/etc/${SOFTWARE}/debconf"
+DEBCONF="/etc/${SOFTWARE}/debconf"
DEBCONF_NOWARNINGS="true"
export DEBCONF_NOWARNINGS
@@ -35,32 +35,32 @@ then
# user specified one or more preseed files through commandline option
db_set container/preseed-file "${PRESEED_FILE}"
db_fset container/preseed-file seen true
-elif [ -e "${CONFIG}/${NAME}.cfg" ]
+elif [ -e "${DEBCONF}/${NAME}.cfg" ]
then
# user did not specify a pressed file, but there is a matching one
# available on the system matching the container name
- db_set container/preseed-file "${CONFIG}/${NAME}.cfg"
+ db_set container/preseed-file "${DEBCONF}/${NAME}.cfg"
db_fset container/preseed-file seen true
-elif [ "$(ls ${CONFIG}/*/${NAME}.cfg 2>/dev/null | wc -l)" -eq 1 ]
+elif [ "$(ls ${DEBCONF}/*/${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/${SOFTWARE}/debconf
- FILE="$(ls ${CONFIG}/*/${NAME}.cfg)"
+ FILE="$(ls ${DEBCONF}/*/${NAME}.cfg)"
db_set container/preseed-file "${FILE}"
db_fset container/preseed-file seen true
-elif [ -e "${CONFIG}/default.cfg" ]
+elif [ -e "${DEBCONF}/default.cfg" ]
then
# user did not specify a pressed file, but there is a default one
- db_set container/preseed-file "${CONFIG}/default.cfg"
+ db_set container/preseed-file "${DEBCONF}/default.cfg"
db_fset container/preseed-file seen true
-elif ls "${CONFIG}"/*.cfg > /dev/null 2>&1 || ls "${CONFIG}"/*/*.cfg > /dev/null 2>&1
+elif ls "${DEBCONF}"/*.cfg > /dev/null 2>&1 || ls "${DEBCONF}"/*/*.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' | LC_ALL=C sort)"
+ FILES="$(cd ${DEBCONF} && find . -type f -name '*.cfg' -printf '%P\n' | LC_ALL=C sort)"
PRESEED_FILES="$(for FILE in ${FILES}; do echo -n "$(echo ${FILE} | sed -e 's|.cfg$||'), "; done | sed -e 's|, $||')"
if [ -n "${PRESEED_FILES}" ]
@@ -84,7 +84,7 @@ then
*)
# user specified preseed file through debconf select
- db_set container/preseed-file "${CONFIG}/${PRESEED_FILE}.cfg"
+ db_set container/preseed-file "${DEBCONF}/${PRESEED_FILE}.cfg"
db_fset container/preseed-file seen true
;;
esac