From 6dfbd8d9b0b55ebe052f91ae5823d8108799983a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 18 Feb 2018 16:12:38 +0100 Subject: Merging upstream version 20180218. Signed-off-by: Daniel Baumann --- share/scripts/debconf.d/0001-preseed-file | 17 +++++++++++++---- share/scripts/debconf.d/0002-preseed-debconf | 2 +- share/scripts/debconf.d/0003-debconf | 10 +++++++--- 3 files changed, 21 insertions(+), 8 deletions(-) (limited to 'share/scripts/debconf.d') diff --git a/share/scripts/debconf.d/0001-preseed-file b/share/scripts/debconf.d/0001-preseed-file index 5b646c4..fab7d8d 100755 --- a/share/scripts/debconf.d/0001-preseed-file +++ b/share/scripts/debconf.d/0001-preseed-file @@ -1,7 +1,7 @@ #!/bin/sh # container-tools - Manage systemd-nspawn containers -# Copyright (C) 2014-2017 Daniel Baumann +# Copyright (C) 2014-2018 Daniel Baumann # # SPDX-License-Identifier: GPL-3.0+ # @@ -38,18 +38,27 @@ 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 ] +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 + + FILE="$(ls ${CONFIG}/*/${NAME}.cfg)" + + db_set cnt-debconf/preseed-file "${FILE}" + db_fset cnt-debconf/preseed-file seen true elif [ -e "${CONFIG}/default.cfg" ] 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|, $||')" + FILES="$(cd ${CONFIG} && 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}" ] then diff --git a/share/scripts/debconf.d/0002-preseed-debconf b/share/scripts/debconf.d/0002-preseed-debconf index 3a96ad4..ac101ad 100755 --- a/share/scripts/debconf.d/0002-preseed-debconf +++ b/share/scripts/debconf.d/0002-preseed-debconf @@ -1,7 +1,7 @@ #!/bin/sh # container-tools - Manage systemd-nspawn containers -# Copyright (C) 2014-2017 Daniel Baumann +# Copyright (C) 2014-2018 Daniel Baumann # # SPDX-License-Identifier: GPL-3.0+ # diff --git a/share/scripts/debconf.d/0003-debconf b/share/scripts/debconf.d/0003-debconf index 4395abc..cb9ae2a 100755 --- a/share/scripts/debconf.d/0003-debconf +++ b/share/scripts/debconf.d/0003-debconf @@ -1,7 +1,7 @@ #!/bin/sh # container-tools - Manage systemd-nspawn containers -# Copyright (C) 2014-2017 Daniel Baumann +# Copyright (C) 2014-2018 Daniel Baumann # # SPDX-License-Identifier: GPL-3.0+ # @@ -54,8 +54,8 @@ Distribution () then case "${MODE}" in debian) - db_subst cnt-debconf/distribution CHOICES "Debian GNU/Linux 9 \"stretch\", Debian GNU/Linux unstable/sid" - db_subst cnt-debconf/distribution CHOICES_C "stretch, sid" + db_subst cnt-debconf/distribution CHOICES "Debian GNU/Linux 9 \"stretch\", Debian GNU/Linux testing/buster, Debian GNU/Linux unstable/sid" + db_subst cnt-debconf/distribution CHOICES_C "stretch, buster, sid" db_set cnt-debconf/distribution stretch db_fset cnt-debconf/distribution seen false @@ -212,6 +212,10 @@ Archives () db_set cnt-debconf/archives "" ;; + buster) + db_set cnt-debconf/archives "${DISTRIBUTION}-security, ${DISTRIBUTION}-updates" + ;; + *) #db_set cnt-debconf/archives "${DISTRIBUTION}-security, ${DISTRIBUTION}-updates, ${DISTRIBUTION}-backports" db_set cnt-debconf/archives "${DISTRIBUTION}-security, ${DISTRIBUTION}-updates" -- cgit v1.2.3