summaryrefslogtreecommitdiffstats
path: root/share/scripts/debconf.d
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2018-02-18 15:12:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2018-02-18 15:12:33 +0000
commitb609b560db2c50b53a7243e257b0692dd612ad06 (patch)
tree140ac1a219edd21244fc1f2d5989342aa7711f0c /share/scripts/debconf.d
parentAdding upstream version 20180118. (diff)
downloadopen-infrastructure-compute-tools-b609b560db2c50b53a7243e257b0692dd612ad06.tar.xz
open-infrastructure-compute-tools-b609b560db2c50b53a7243e257b0692dd612ad06.zip
Adding upstream version 20180218.upstream/20180218
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/scripts/debconf.d')
-rwxr-xr-xshare/scripts/debconf.d/0001-preseed-file17
-rwxr-xr-xshare/scripts/debconf.d/0002-preseed-debconf2
-rwxr-xr-xshare/scripts/debconf.d/0003-debconf10
3 files changed, 21 insertions, 8 deletions
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 <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# 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 <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# 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 <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# 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"