diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-17 17:40:15 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-17 17:40:15 +0000 |
commit | 5776f47d6e5ee4fe7797ec31aad2e3bbbb08b8d2 (patch) | |
tree | 64b345517eadfb03724eda8deebd56ec917fba69 /share/scripts | |
parent | Adding upstream version 20180825. (diff) | |
download | open-infrastructure-compute-tools-5776f47d6e5ee4fe7797ec31aad2e3bbbb08b8d2.tar.xz open-infrastructure-compute-tools-5776f47d6e5ee4fe7797ec31aad2e3bbbb08b8d2.zip |
Adding upstream version 20190217.upstream/20190217
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | share/scripts/curl | 25 | ||||
-rwxr-xr-x | share/scripts/curl.d/0001-debconf | 3 | ||||
-rwxr-xr-x | share/scripts/debconf | 92 | ||||
-rwxr-xr-x | share/scripts/debconf.d/0001-preseed-file | 41 | ||||
-rw-r--r-- | share/scripts/debconf.d/0001-preseed-file.templates | 8 | ||||
-rwxr-xr-x | share/scripts/debconf.d/0002-preseed-debconf | 7 | ||||
-rwxr-xr-x | share/scripts/debconf.d/0003-debconf | 427 | ||||
-rw-r--r-- | share/scripts/debconf.d/0003-debconf.templates | 58 | ||||
-rwxr-xr-x | share/scripts/debootstrap | 7 |
9 files changed, 308 insertions, 360 deletions
diff --git a/share/scripts/curl b/share/scripts/curl index 72bdec3..314ecbd 100755 --- a/share/scripts/curl +++ b/share/scripts/curl @@ -1,7 +1,6 @@ #!/bin/sh -# container-tools - Manage systemd-nspawn containers -# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net> +# Copyright (C) 2014-2019 Daniel Baumann <daniel.baumann@open-infrastructure.net> # # SPDX-License-Identifier: GPL-3.0+ # @@ -22,10 +21,10 @@ set -e SCRIPT="${0}" -HOOKS="/etc/container-tools/hooks" -KEYS="/etc/container-tools/keys" +HOOKS="/etc/compute-tools/container/hooks" +KEYS="/etc/compute-tools/container/keys" MACHINES="/var/lib/machines" -CACHE="/var/cache/container-tools/system" +CACHE="/var/cache/compute-tools/system" Parameters () { @@ -172,7 +171,7 @@ then exit 1 fi -SERVER="${SERVER:-https://files.open-infrastructure.net/system/container/debian}" +SERVER="${SERVER:-https://get.open-infrastructure.net/system/container/debian}" PASSWORD="${PASSWORD:-$(dd if=/dev/urandom bs=12 count=1 2> /dev/null | base64)}" VERSION="$(container version)" @@ -241,8 +240,8 @@ then # Downloading container list if curl --fail --head --output /dev/null --silent "${SERVER}/container-list.txt" then - mkdir -p /tmp/container-tools - DEBCONF_TMPDIR="$(mktemp -d -p /tmp/container-tools -t $(basename ${0}).XXXX)" + mkdir -p /tmp/compute-tools + DEBCONF_TMPDIR="$(mktemp -d -p /tmp/compute-tools -t $(basename ${0}).XXXX)" export DEBCONF_TMPDIR if [ -z "${ARCHITECTURE}" ] @@ -257,7 +256,7 @@ then GREP_PATTERN="${GREP_PATTERN:-${ARCHITECTURE}}" echo "Downloading $(echo ${SERVER} | awk -F/ '{ print $3 }') container list" - curl --fail --location --progress-bar --user-agent container-tools/${VERSION} ${CURL_OPTIONS} \ + curl --fail --location --progress-bar --user-agent compute-tools/${VERSION} ${CURL_OPTIONS} \ "${SERVER}/container-list.txt" | grep -E "${GREP_PATTERN}" > "${DEBCONF_TMPDIR}/container-list.txt" umask 0022 @@ -265,12 +264,12 @@ then Debconf # Run debconf parts - for DEBCONF_SCRIPT in /usr/share/container-tools/scripts/curl.d/* + for DEBCONF_SCRIPT in /usr/share/compute-tools/container/scripts/curl.d/* do if [ -x "${DEBCONF_SCRIPT}" ] then # FIXME - # debconf -ocontainer-tools "${DEBCONF_SCRIPT}" + # debconf -ocompute-tools "${DEBCONF_SCRIPT}" "${DEBCONF_SCRIPT}" fi done @@ -280,7 +279,7 @@ then # Remove debconf temporary files rm --preserve-root --one-file-system -rf "${DEBCONF_TMPDIR}" - rmdir --ignore-fail-on-non-empty /tmp/container-tools 2>&1 || true + rmdir --ignore-fail-on-non-empty /tmp/compute-tools 2>&1 || true fi fi @@ -320,7 +319,7 @@ do fi echo "Downloading ${FILE}" - curl --fail --location --progress-bar --user-agent container-tools/${VERSION} ${CURL_OPTIONS} ${CURL_TIME_COND} \ + curl --fail --location --progress-bar --user-agent compute-tools/${VERSION} ${CURL_OPTIONS} ${CURL_TIME_COND} \ "${SERVER}/${FILE}" -o "${CACHE}/${FILE}" fi done diff --git a/share/scripts/curl.d/0001-debconf b/share/scripts/curl.d/0001-debconf index 1f31b63..3f98f74 100755 --- a/share/scripts/curl.d/0001-debconf +++ b/share/scripts/curl.d/0001-debconf @@ -1,7 +1,6 @@ #!/bin/sh -# container-tools - Manage systemd-nspawn containers -# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net> +# Copyright (C) 2014-2019 Daniel Baumann <daniel.baumann@open-infrastructure.net> # # SPDX-License-Identifier: GPL-3.0+ # diff --git a/share/scripts/debconf b/share/scripts/debconf index 5325c11..d710d17 100755 --- a/share/scripts/debconf +++ b/share/scripts/debconf @@ -1,7 +1,6 @@ #!/bin/sh -# container-tools - Manage systemd-nspawn containers -# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net> +# Copyright (C) 2014-2019 Daniel Baumann <daniel.baumann@open-infrastructure.net> # # SPDX-License-Identifier: GPL-3.0+ # @@ -23,8 +22,8 @@ set -e SCRIPT="${0}" export SCRIPT -CONFIG="/etc/container-tools/config" -HOOKS="/etc/container-tools/hooks" +CONFIG="/etc/compute-tools/container/config" +HOOKS="/etc/compute-tools/container/hooks" MACHINES="/var/lib/machines" Parameters () @@ -157,7 +156,7 @@ Upgrade_system () # Disable dpkg syncing -cat > "${DIRECTORY}/etc/dpkg/dpkg.cfg.d/container-tools" << EOF +cat > "${DIRECTORY}/etc/dpkg/dpkg.cfg.d/compute-tools" << EOF force-unsafe-io EOF @@ -190,7 +189,7 @@ Cleanup_system () Chroot "${DIRECTORY}" "apt-get clean" # Cleanup - rm -f "${DIRECTORY}/etc/dpkg/dpkg.cfg.d/container-tools" + rm -f "${DIRECTORY}/etc/dpkg/dpkg.cfg.d/compute-tools" rm -f "${DIRECTORY}/usr/sbin/policy-rc.d" # Unmount pseudo-filesystems @@ -202,8 +201,8 @@ Cleanup_system () Debconf () { # Configure local debconf - mkdir -p /tmp/container-tools - DEBCONF_TMPDIR="$(mktemp -d -p /tmp/container-tools -t $(basename ${0}).XXXX)" + mkdir -p /tmp/compute-tools + DEBCONF_TMPDIR="$(mktemp -d -p /tmp/compute-tools -t $(basename ${0}).XXXX)" export DEBCONF_TMPDIR mkdir -p "${DEBCONF_TMPDIR}/debconf" @@ -247,12 +246,18 @@ Debootstrap () EXCLUDE="ifupdown" INCLUDE="dbus" - if echo "${MIRROR}" | grep -qs '^https' || \ - echo "{PARENT_MIRROR}" | grep -qs '^https' + if ( echo "${MIRROR}" | grep -qs '^https' ) || \ + ( echo "${PARENT_MIRROR}" | grep -qs '^https' ) then INCLUDE="${INCLUDE},apt-transport-https,ca-certificates" fi + case "${MODE}" in + progress-linux) + INCLUDE="${INCLUDE},progress-linux,gnupg" + ;; + esac + mkdir -p "$(dirname ${DIRECTORY})" debootstrap --verbose --arch=${ARCHITECTURE} --components=${PARENT_ARCHIVE_AREAS} \ --exclude=${EXCLUDE} --include=${INCLUDE} ${PARENT_DISTRIBUTION} "${DIRECTORY}" ${PARENT_MIRROR} @@ -332,58 +337,7 @@ EOF ;; esac - # Import archive keys - KEYS="project/pgp/archive-key-${DIST}.asc" - - for KEY in ${KEYS} - do - KEY_NAME="$(basename ${KEY})" - echo "P: Fetching archive-key ${KEY_NAME}..." - - wget -q "${MIRROR}/${KEY}" -O "${DIRECTORY}/key.asc" - wget -q "${MIRROR}/${KEY}.gpg" -O "${DIRECTORY}/key.asc.gpg" - - if [ -e /usr/bin/gpgv ] - then - if [ -e /usr/share/keyrings/debian-keyring.gpg ] || [ -e /usr/share/keyrings/debian-maintainers.gpg ] - then - KEY_VALID="" - - for KEYRING in /usr/share/keyrings/debian-keyring.gpg /usr/share/keyrings/debian-maintainers.gpg - do - if [ -e "${KEYRING}" ] - then - echo -n "I: Verifying archive-key ${KEY_NAME} against $(basename ${KEYRING} .gpg | sed -e 's|-keyring||') keyring..." - - # FIXME: doesn't work anymore when the template eventually be run with 'set -e' - /usr/bin/gpgv --quiet --keyring ${KEYRING} "${DIRECTORY}/key.asc.gpg" "${DIRECTORY}/key.asc" > /dev/null 2>&1 && KEY_VALID="true" && break - fi - done - - case "${KEY_VALID}" in - true) - echo " successful." - ;; - - *) - echo " failed." - return 1 - ;; - esac - else - echo "W: Skipping archive-key ${KEY_NAME} verification, debian-keyring not available..." - fi - else - echo "W: Skipping archive-key ${KEY_NAME} verification, gpgv not available..." - fi - - echo "P: Importing archive-key ${KEY_NAME}..." - - Chroot "${DIRECTORY}" "apt-key add key.asc" - rm -f "${DIRECTORY}/key.asc" - rm -f "${DIRECTORY}/key.asc.gpg" - done - + Chroot "${DIRECTORY}" "apt-key add /usr/share/progress-linux/pgp-keys/apt.progress-linux.org.gpg" || Chroot "${DIRECTORY}" "apt-key add /usr/share/progress-linux/pgp-keys/progress-linux-5-engywuck-archive-key.gpg" Chroot "${DIRECTORY}" "apt-get update" ;; esac @@ -898,7 +852,7 @@ EOF cat > "${DIRECTORY}/etc/systemd/system/cnt-ipv4-post-up-eno${NUMBER}.service" << EOF [Unit] -Description=container-tools IPV4_POST_UP +Description=compute-tools IPV4_POST_UP After=network-online.target Wants=network-online.target @@ -918,7 +872,7 @@ EOF cat > "${DIRECTORY}/etc/systemd/system/cnt-ipv4-post-down-eno${NUMBER}.service" << EOF [Unit] -Description=container-tools IPV4_POST_DOWN +Description=compute-tools IPV4_POST_DOWN After=network.target Wants=network.target @@ -1031,12 +985,12 @@ do done # Run debconf parts -for DEBCONF_SCRIPT in /usr/share/container-tools/scripts/debconf.d/* +for DEBCONF_SCRIPT in /usr/share/compute-tools/container/scripts/debconf.d/* do if [ -x "${DEBCONF_SCRIPT}" ] then # FIXME - # debconf -ocontainer-tools "${DEBCONF_SCRIPT}" + # debconf -ocompute-tools "${DEBCONF_SCRIPT}" "${DEBCONF_SCRIPT}" fi done @@ -1044,7 +998,7 @@ done # Read-in configuration from debconf . "${DEBCONF_TMPDIR}/debconf.default" -CACHE="/var/cache/container-tools/${MODE}" +CACHE="/var/cache/compute-tools/${MODE}" SYSTEM="${MACHINES}/${NAME}" ## Generic parts @@ -1057,7 +1011,7 @@ then mv "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}.tmp" "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" fi -Upgrade_system "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" || echo "W: If upgrading the system failed, try removing the cache for your distribution in /var/cache/container-tools" +Upgrade_system "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" || echo "W: If upgrading the system failed, try removing the cache for your distribution in /var/cache/compute-tools" Cleanup_system "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" ## Specific parts @@ -1175,7 +1129,7 @@ fi # remove debconf temporary files rm --preserve-root --one-file-system -rf "${DEBCONF_TMPDIR}" -rmdir --ignore-fail-on-non-empty /tmp/container-tools 2>&1 || true +rmdir --ignore-fail-on-non-empty /tmp/compute-tools 2>&1 || true # Post hooks for FILE in "${HOOKS}/post-${SCRIPT}".* "${HOOKS}/${NAME}.post-${SCRIPT}" diff --git a/share/scripts/debconf.d/0001-preseed-file b/share/scripts/debconf.d/0001-preseed-file index fab7d8d..77b66ca 100755 --- a/share/scripts/debconf.d/0001-preseed-file +++ b/share/scripts/debconf.d/0001-preseed-file @@ -1,7 +1,6 @@ #!/bin/sh -# container-tools - Manage systemd-nspawn containers -# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net> +# Copyright (C) 2014-2019 Daniel Baumann <daniel.baumann@open-infrastructure.net> # # SPDX-License-Identifier: GPL-3.0+ # @@ -20,7 +19,7 @@ set -e -CONFIG="/etc/container-tools/debconf" +CONFIG="/etc/compute-tools/container/debconf" DEBCONF_NOWARNINGS="true" export DEBCONF_NOWARNINGS @@ -30,28 +29,28 @@ export DEBCONF_NOWARNINGS if [ -n "${PRESEED_FILE}" ] then # user specified one or more preseed files through commandline option - db_set cnt-debconf/preseed-file "${PRESEED_FILE}" - db_fset cnt-debconf/preseed-file seen true + db_set container/preseed-file "${PRESEED_FILE}" + db_fset container/preseed-file seen true elif [ -e "${CONFIG}/${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 cnt-debconf/preseed-file "${CONFIG}/${NAME}.cfg" - db_fset cnt-debconf/preseed-file seen true + db_set container/preseed-file "${CONFIG}/${NAME}.cfg" + db_fset container/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 + # matching in a sub-directory of /etc/compute-tools/container/debconf FILE="$(ls ${CONFIG}/*/${NAME}.cfg)" - db_set cnt-debconf/preseed-file "${FILE}" - db_fset cnt-debconf/preseed-file seen true + db_set container/preseed-file "${FILE}" + db_fset container/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 + db_set container/preseed-file "${CONFIG}/default.cfg" + db_fset container/preseed-file seen true 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, @@ -62,13 +61,13 @@ then if [ -n "${PRESEED_FILES}" ] then - db_subst cnt-debconf/preseed-files CHOICES "none, custom, , ${PRESEED_FILES}" + db_subst container/preseed-files CHOICES "none, custom, , ${PRESEED_FILES}" - db_settitle cnt-debconf/title - db_input high cnt-debconf/preseed-files || true + db_settitle container/title + db_input high container/preseed-files || true db_go - db_get cnt-debconf/preseed-files + db_get container/preseed-files PRESEED_FILE="${RET}" # select case "${PRESEED_FILE}" in @@ -77,8 +76,8 @@ then *) # user specified preseed file through debconf select - db_set cnt-debconf/preseed-file "${CONFIG}/${PRESEED_FILE}.cfg" - db_fset cnt-debconf/preseed-file seen true + db_set container/preseed-file "${CONFIG}/${PRESEED_FILE}.cfg" + db_fset container/preseed-file seen true ;; esac fi @@ -90,11 +89,11 @@ case "${PRESEED_FILE}" in *) # ask user for a preseed file - db_settitle cnt-debconf/title - db_input high cnt-debconf/preseed-file || true + db_settitle container/title + db_input high container/preseed-file || true db_go - db_get cnt-debconf/preseed-file + db_get container/preseed-file PRESEED_FILE="${RET}" # string (w/ empty) echo "PRESEED_FILE=\"${PRESEED_FILE}\"" >> "${DEBCONF_TMPDIR}/debconf.default" diff --git a/share/scripts/debconf.d/0001-preseed-file.templates b/share/scripts/debconf.d/0001-preseed-file.templates index 707da95..7e12e0d 100644 --- a/share/scripts/debconf.d/0001-preseed-file.templates +++ b/share/scripts/debconf.d/0001-preseed-file.templates @@ -1,14 +1,14 @@ -Template: cnt-debconf/title +Template: container/title Type: title -Description: container-tools +Description: compute-tools -Template: cnt-debconf/preseed-files +Template: container/preseed-files Type: select Default: none Choices: ${CHOICES} Description: Choose a preseed config, enter a custom one, or use no preseed file at all. -Template: cnt-debconf/preseed-file +Template: container/preseed-file Type: string Default: Description: Enter (optional) preseed file to use: diff --git a/share/scripts/debconf.d/0002-preseed-debconf b/share/scripts/debconf.d/0002-preseed-debconf index ac101ad..086fffc 100755 --- a/share/scripts/debconf.d/0002-preseed-debconf +++ b/share/scripts/debconf.d/0002-preseed-debconf @@ -1,7 +1,6 @@ #!/bin/sh -# container-tools - Manage systemd-nspawn containers -# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net> +# Copyright (C) 2014-2019 Daniel Baumann <daniel.baumann@open-infrastructure.net> # # SPDX-License-Identifier: GPL-3.0+ # @@ -50,14 +49,14 @@ do # add preseed file to debconf DEBCONF_PRESEED_FILES="${DEBCONF_PRESEED_FILES} ${PRESEED_FILE}" - if ! grep -qs '^ *container-tools *cnt-debconf/include-preseed-files' "${PRESEED_FILE}" + if ! grep -qs '^ *compute-tools *container/include-preseed-files' "${PRESEED_FILE}" then # preseed file has no includes continue fi # preseed file has includes - INCLUDE_PRESEED_FILES="$(grep '^ *container-tools *cnt-debconf/include-preseed-files' ${PRESEED_FILE} | awk '{ $1=$2=$3=""; print $0 }' | sed -e 's|,| |g')" + INCLUDE_PRESEED_FILES="$(grep '^ *compute-tools *container/include-preseed-files' ${PRESEED_FILE} | awk '{ $1=$2=$3=""; print $0 }' | sed -e 's|,| |g')" # FIXME: we're supporting only *ONE* include layer for now, so no nested/recursive includes just yet for FILE in ${INCLUDE_PRESEED_FILES} diff --git a/share/scripts/debconf.d/0003-debconf b/share/scripts/debconf.d/0003-debconf index 1d04adc..9183538 100755 --- a/share/scripts/debconf.d/0003-debconf +++ b/share/scripts/debconf.d/0003-debconf @@ -1,7 +1,6 @@ #!/bin/sh -# container-tools - Manage systemd-nspawn containers -# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net> +# Copyright (C) 2014-2019 Daniel Baumann <daniel.baumann@open-infrastructure.net> # # SPDX-License-Identifier: GPL-3.0+ # @@ -27,7 +26,7 @@ export DEBCONF_NOWARNINGS Mode () { - db_get cnt-debconf/mode + db_get container/mode MODE="${RET}" # select if [ -z "${MODE}" ] @@ -47,34 +46,34 @@ Mode () Distribution () { - db_get cnt-debconf/distribution + db_get container/distribution DISTRIBUTION="${RET}" # select if [ -z "${DISTRIBUTION}" ] then case "${MODE}" in debian) - 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_subst container/distribution CHOICES "Debian GNU/Linux 9 \"stretch\", Debian GNU/Linux 10 \"buster\", Debian GNU/Linux testing/bullseye, Debian GNU/Linux unstable/sid" + db_subst container/distribution CHOICES_C "stretch, buster, bullseye, sid" - db_set cnt-debconf/distribution stretch - db_fset cnt-debconf/distribution seen false + db_set container/distribution buster + db_fset container/distribution seen false ;; progress-linux) - db_subst cnt-debconf/distribution CHOICES "Progress Linux 4 (dschinn), Progress Linux 4+ (dschinn-backports)" - db_subst cnt-debconf/distribution CHOICES_C "dschinn, dschinn-backports" + db_subst container/distribution CHOICES "Progress Linux 5 (engywuck), Progress Linux 5+ (engywuck-backports)" + db_subst container/distribution CHOICES_C "engywuck, engywuck-backports" - db_set cnt-debconf/distribution dschinn-backports - db_fset cnt-debconf/distribution seen false + db_set container/distribution engywuck-backports + db_fset container/distribution seen false ;; esac - db_settitle cnt-debconf/title - db_input high cnt-debconf/distribution || true + db_settitle container/title + db_input high container/distribution || true db_go - db_get cnt-debconf/distribution + db_get container/distribution DISTRIBUTION="${RET}" # select fi @@ -84,7 +83,7 @@ Distribution () Parent_distribution () { - db_get cnt-debconf/parent-distribution + db_get container/parent-distribution PARENT_DISTRIBUTION="${RET}" if [ -z "${PARENT_DISTRIBUTION}" ] @@ -92,8 +91,8 @@ Parent_distribution () case "${MODE}" in progress-linux) case "${DISTRIBUTION}" in - dschinn*) - PARENT_DISTRIBUTION="stretch" + engywuck*) + PARENT_DISTRIBUTION="buster" ;; esac ;; @@ -156,22 +155,22 @@ Architecture () exit 1 esac - db_get cnt-debconf/architecture + db_get container/architecture ARCHITECTURE="${RET}" # select if [ -z "${ARCHITECTURE}" ] && [ -n "${CHOICES}" ] then - db_subst cnt-debconf/architecture CHOICES ${CHOICES} - db_subst cnt-debconf/architecture CHOICES_C ${CHOICES_C} + db_subst container/architecture CHOICES ${CHOICES} + db_subst container/architecture CHOICES_C ${CHOICES_C} - db_set cnt-debconf/architecture ${DEFAULT} - db_fset cnt-debconf/distribution seen false + db_set container/architecture ${DEFAULT} + db_fset container/distribution seen false - db_settitle cnt-debconf/title - db_input high cnt-debconf/architecture || true + db_settitle container/title + db_input high container/architecture || true db_go - db_get cnt-debconf/architecture + db_get container/architecture ARCHITECTURE="${RET}" # select fi @@ -187,7 +186,7 @@ Architecture () Archives () { - db_get cnt-debconf/archives + db_get container/archives ARCHIVES="${RET}" # multiselect if [ -z "${ARCHIVES}" ] @@ -196,33 +195,33 @@ Archives () debian) case "${PARENT_DISTRIBUTION}" in sid) - db_subst cnt-debconf/archives CHOICES "Experimental" - db_subst cnt-debconf/archives CHOICES_C "experimental" + db_subst container/archives CHOICES "Experimental" + db_subst container/archives CHOICES_C "experimental" - db_set cnt-debconf/archives "" - db_fset cnt-debconf/archives seen false + db_set container/archives "" + db_fset container/archives seen false ;; *) - db_subst cnt-debconf/archives CHOICES "Security, Updates, Backports, Proposed Updates" - db_subst cnt-debconf/archives CHOICES_C "${DISTRIBUTION}-security, ${DISTRIBUTION}-updates, ${DISTRIBUTION}-backports, ${DISTRIBUTION}-proposed-updates" + db_subst container/archives CHOICES "Security, Updates, Backports, Proposed Updates" + db_subst container/archives CHOICES_C "${DISTRIBUTION}-security, ${DISTRIBUTION}-updates, ${DISTRIBUTION}-backports, ${DISTRIBUTION}-proposed-updates" case "${PARENT_DISTRIBUTION}" in sid) - db_set cnt-debconf/archives "" + db_set container/archives "" ;; buster) - db_set cnt-debconf/archives "${DISTRIBUTION}-security, ${DISTRIBUTION}-updates" + db_set container/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" + #db_set container/archives "${DISTRIBUTION}-security, ${DISTRIBUTION}-updates, ${DISTRIBUTION}-backports" + db_set container/archives "${DISTRIBUTION}-security, ${DISTRIBUTION}-updates" ;; esac - db_fset cnt-debconf/archives seen false + db_fset container/archives seen false ;; esac ;; @@ -230,19 +229,19 @@ Archives () progress-linux) DIST="$(echo ${DISTRIBUTION} | sed -e 's|-backports||')" - db_subst cnt-debconf/archives CHOICES "staging, Security, Security (staging), Updates, Updates (staging), Extras, Extras (staging), Backports, Backports (staging), Backports Extras, Backports Extras (staging)" - db_subst cnt-debconf/archives CHOICES_C "${DIST}-staging, ${DIST}-security, ${DIST}-security-staging, ${DIST}-updates, ${DIST}-updates-staging, ${DIST}-extras, ${DIST}-extras-staging, ${DIST}-backports, ${DIST}-backports-staging, ${DIST}-backports-extras, ${DIST}-backports-extras-staging" + db_subst container/archives CHOICES "staging, Security, Security (staging), Updates, Updates (staging), Extras, Extras (staging), Backports, Backports (staging), Backports Extras, Backports Extras (staging)" + db_subst container/archives CHOICES_C "${DIST}-staging, ${DIST}-security, ${DIST}-security-staging, ${DIST}-updates, ${DIST}-updates-staging, ${DIST}-extras, ${DIST}-extras-staging, ${DIST}-backports, ${DIST}-backports-staging, ${DIST}-backports-extras, ${DIST}-backports-extras-staging" - db_set cnt-debconf/archives "${DIST}-security, ${DIST}-updates, ${DIST}-extras, ${DIST}-backports, ${DIST}-backports-extras" - db_fset cnt-debconf/archives seen false + db_set container/archives "${DIST}-security, ${DIST}-updates, ${DIST}-extras, ${DIST}-backports, ${DIST}-backports-extras" + db_fset container/archives seen false ;; esac - db_settitle cnt-debconf/title - db_input high cnt-debconf/archives || true + db_settitle container/title + db_input high container/archives || true db_go - db_get cnt-debconf/archives + db_get container/archives ARCHIVES="${RET}" # multiselect fi @@ -254,40 +253,40 @@ Archives () Parent_archives () { - db_get cnt-debconf/parent-archives + db_get container/parent-archives PARENT_ARCHIVES="${RET}" # multiselect (w/o empty) if [ -z "${PARENT_ARCHIVES}" ] then case "${MODE}" in progress-linux) - db_subst cnt-debconf/parent-archives CHOICES "Security, Updates, Backports, Proposed Updates" - db_subst cnt-debconf/parent-archives CHOICES_C "${PARENT_DISTRIBUTION}-security, ${PARENT_DISTRIBUTION}-updates, ${PARENT_DISTRIBUTION}-backports, ${PARENT_DISTRIBUTION}-proposed-updates" + db_subst container/parent-archives CHOICES "Security, Updates, Backports, Proposed Updates" + db_subst container/parent-archives CHOICES_C "${PARENT_DISTRIBUTION}-security, ${PARENT_DISTRIBUTION}-updates, ${PARENT_DISTRIBUTION}-backports, ${PARENT_DISTRIBUTION}-proposed-updates" case "${PARENT_DISTRIBUTION}" in *) - #db_set cnt-debconf/parent-archives "${PARENT_DISTRIBUTION}-security, ${PARENT_DISTRIBUTION}-updates, ${PARENT_DISTRIBUTION}-backports" - db_set cnt-debconf/parent-archives "${PARENT_DISTRIBUTION}-security, ${PARENT_DISTRIBUTION}-updates" + #db_set container/parent-archives "${PARENT_DISTRIBUTION}-security, ${PARENT_DISTRIBUTION}-updates, ${PARENT_DISTRIBUTION}-backports" + db_set container/parent-archives "${PARENT_DISTRIBUTION}-security, ${PARENT_DISTRIBUTION}-updates" ;; esac - db_fset cnt-debconf/parent-archives seen false + db_fset container/parent-archives seen false - db_settitle cnt-debconf/title - db_input high cnt-debconf/parent-archives || true + db_settitle container/title + db_input high container/parent-archives || true db_go ;; *) - db_subst cnt-debconf/parent-archives CHOICES "Security, Updates, Backports, Proposed Updates" - db_subst cnt-debconf/parent-archives CHOICES_C "${ARCHIVES}" + db_subst container/parent-archives CHOICES "Security, Updates, Backports, Proposed Updates" + db_subst container/parent-archives CHOICES_C "${ARCHIVES}" - db_set cnt-debconf/parent-archives "${ARCHIVES}" - db_fset cnt-debconf/parent-archives seen true + db_set container/parent-archives "${ARCHIVES}" + db_fset container/parent-archives seen true ;; esac - db_get cnt-debconf/parent-archives + db_get container/parent-archives PARENT_ARCHIVES="${RET}" # multiselect (w/o empty) if [ -z "${PARENT_ARCHIVES}" ] @@ -317,28 +316,28 @@ Parent_archives () Mirror () { - db_get cnt-debconf/mirror + db_get container/mirror MIRROR="${RET}" if [ -z "${MIRROR}" ] then case "${MODE}" in debian) - db_set cnt-debconf/mirror https://deb.debian.org/debian - db_fset cnt-debconf/mirror seen false + db_set container/mirror https://deb.debian.org/debian + db_fset container/mirror seen false ;; progress-linux) - db_set cnt-debconf/mirror https://cdn.archive.progress-linux.org/packages - db_fset cnt-debconf/mirror seen false + db_set container/mirror https://cdn.deb.progress-linux.org/packages + db_fset container/mirror seen false ;; esac - db_settitle cnt-debconf/title - db_input high cnt-debconf/mirror || true + db_settitle container/title + db_input high container/mirror || true db_go - db_get cnt-debconf/mirror + db_get container/mirror MIRROR="${RET}" # string (w/o empty) if [ -z "${MIRROR}" ] @@ -349,7 +348,7 @@ Mirror () ;; progress-linux) - MIRROR="https://cdn.archive.progress-linux.org/packages" + MIRROR="https://cdn.deb.progress-linux.org/packages" ;; esac fi @@ -366,28 +365,28 @@ Mirror_security () return 0 fi - db_get cnt-debconf/mirror-security + db_get container/mirror-security MIRROR_SECURITY="${RET}" # string (w/o empty) if [ -z "${MIRROR_SECURITY}" ] then case "${MODE}" in debian) - db_set cnt-debconf/mirror-security http://security.debian.org - db_fset cnt-debconf/mirror-security seen false + db_set container/mirror-security http://security.debian.org + db_fset container/mirror-security seen false ;; *) - db_set cnt-debconf/mirror-security ${MIRROR} - db_fset cnt-debconf/mirror-security seen true + db_set container/mirror-security ${MIRROR} + db_fset container/mirror-security seen true ;; esac - db_settitle cnt-debconf/title - db_input high cnt-debconf/mirror-security || true + db_settitle container/title + db_input high container/mirror-security || true db_go - db_get cnt-debconf/mirror-security + db_get container/mirror-security MIRROR_SECURITY="${RET}" # string (w/o empty) if [ -z "${MIRROR_SECURITY}" ] @@ -410,28 +409,28 @@ Mirror_security () Parent_mirror () { - db_get cnt-debconf/parent-mirror + db_get container/parent-mirror PARENT_MIRROR="${RET}" # string (w/o empty) if [ -z "${PARENT_MIRROR}" ] then case "${MODE}" in progress-linux) - db_set cnt-debconf/parent-mirror https://deb.debian.org/debian - db_fset cnt-debconf/parent-mirror seen false + db_set container/parent-mirror https://deb.debian.org/debian + db_fset container/parent-mirror seen false - db_settitle cnt-debconf/title - db_input high cnt-debconf/parent-mirror || true + db_settitle container/title + db_input high container/parent-mirror || true db_go ;; *) - db_set cnt-debconf/parent-mirror ${MIRROR} - db_fset cnt-debconf/parent-mirror seen true + db_set container/parent-mirror ${MIRROR} + db_fset container/parent-mirror seen true ;; esac - db_get cnt-debconf/parent-mirror + db_get container/parent-mirror PARENT_MIRROR="${RET}" # string (w/o empty) if [ -z "${PARENT_MIRROR}" ] @@ -459,28 +458,28 @@ Parent_mirror_security () return 0 fi - db_get cnt-debconf/parent-mirror-security + db_get container/parent-mirror-security PARENT_MIRROR_SECURITY="${RET}" # string (w/o empty) if [ -z "${PARENT_MIRROR_SECURITY}" ] then case "${MODE}" in progress-linux) - db_set cnt-debconf/parent-mirror-security http://security.debian.org - db_fset cnt-debconf/parent-mirror-security seen false + db_set container/parent-mirror-security http://security.debian.org + db_fset container/parent-mirror-security seen false - db_settitle cnt-debconf/title - db_input high cnt-debconf/parent-mirror-security || true + db_settitle container/title + db_input high container/parent-mirror-security || true db_go ;; *) - db_set cnt-debconf/parent-mirror-security ${MIRROR_SECURITY} - db_fset cnt-debconf/parent-mirror-security seen true + db_set container/parent-mirror-security ${MIRROR_SECURITY} + db_fset container/parent-mirror-security seen true ;; esac - db_get cnt-debconf/parent-mirror-security + db_get container/parent-mirror-security PARENT_MIRROR_SECURITY="${RET}" # string (w/o empty) if [ -z "${PARENT_MIRROR_SECURITY}" ] @@ -503,32 +502,32 @@ Parent_mirror_security () Archive_areas () { - db_get cnt-debconf/archive-areas + db_get container/archive-areas ARCHIVE_AREAS="${RET}" if [ -z "${ARCHIVE_AREAS}" ] then case "${MODE}" in progress-linux) - db_subst cnt-debconf/archive-areas CHOICES "main, contrib, non-free" + db_subst container/archive-areas CHOICES "main, contrib, non-free" - db_set cnt-debconf/archive-areas "main, contrib, non-free" - db_fset cnt-debconf/archive-areas seen false + db_set container/archive-areas "main, contrib, non-free" + db_fset container/archive-areas seen false ;; *) - db_subst cnt-debconf/archive-areas CHOICES "main, contrib, non-free" + db_subst container/archive-areas CHOICES "main, contrib, non-free" - db_set cnt-debconf/archive-areas "main" - db_fset cnt-debconf/archive-areas seen false + db_set container/archive-areas "main" + db_fset container/archive-areas seen false ;; esac - db_settitle cnt-debconf/title - db_input high cnt-debconf/archive-areas || true + db_settitle container/title + db_input high container/archive-areas || true db_go - db_get cnt-debconf/archive-areas + db_get container/archive-areas ARCHIVE_AREAS="${RET}" # multiselect (w/o empty) if [ -z "${ARCHIVE_AREAS}" ] @@ -553,32 +552,32 @@ Archive_areas () Parent_archive_areas () { - db_get cnt-debconf/parent-archive-areas + db_get container/parent-archive-areas PARENT_ARCHIVE_AREAS="${RET}" # multiselect (w/o empty) if [ -z "${PARENT_ARCHIVE_AREAS}" ] then case "${MODE}" in progress-linux) - db_subst cnt-debconf/parent-archive-areas CHOICES "main, contrib, non-free" + db_subst container/parent-archive-areas CHOICES "main, contrib, non-free" - db_set cnt-debconf/parent-archive-areas "main, contrib, non-free" - db_fset cnt-debconf/parent-archive-areas seen false + db_set container/parent-archive-areas "main, contrib, non-free" + db_fset container/parent-archive-areas seen false - db_settitle cnt-debconf/title - db_input high cnt-debconf/parent-archive-areas || true + db_settitle container/title + db_input high container/parent-archive-areas || true db_go ;; *) - db_subst cnt-debconf/parent-archive-areas CHOICES "${ARCHIVE_AREAS}" + db_subst container/parent-archive-areas CHOICES "${ARCHIVE_AREAS}" - db_set cnt-debconf/parent-archive-areas "${ARCHIVE_AREAS}" - db_fset cnt-debconf/parent-archive-areas seen true + db_set container/parent-archive-areas "${ARCHIVE_AREAS}" + db_fset container/parent-archive-areas seen true ;; esac - db_get cnt-debconf/parent-archive-areas + db_get container/parent-archive-areas PARENT_ARCHIVE_AREAS="${RET}" # multiselect (w/o empty) if [ -z "${PARENT_ARCHIVE_AREAS}" ] @@ -603,16 +602,16 @@ Parent_archive_areas () Packages () { - db_get cnt-debconf/packages + db_get container/packages PACKAGES="${RET}" # string (w/ empty) if [ -z "${PACKAGES}" ] then - db_settitle cnt-debconf/title - db_input high cnt-debconf/packages || true + db_settitle container/title + db_input high container/packages || true db_go - db_get cnt-debconf/packages + db_get container/packages PACKAGES="${RET}" # string (w/ empty) fi @@ -624,20 +623,20 @@ Local_archives () { NUMBER="1" - while db_get cnt-debconf/archive${NUMBER}/repository && [ "${RET}" ] + while db_get container/archive${NUMBER}/repository && [ "${RET}" ] do mkdir -p "${DEBCONF_TMPDIR}/apt" REPOSITORY="${RET#deb }" LIST="archive${NUMBER}.list" - if db_get cnt-debconf/archive${NUMBER}/list + if db_get container/archive${NUMBER}/list then LIST="$(basename ${RET} .list).list" fi COMMENT="" - if db_get cnt-debconf/archive${NUMBER}/comment + if db_get container/archive${NUMBER}/comment then COMMENT="${RET}" @@ -646,13 +645,13 @@ Local_archives () echo "deb ${REPOSITORY}" >> "${DEBCONF_TMPDIR}/apt/${LIST}" - if db_get cnt-debconf/archive${NUMBER}/source && [ "$RET" = true ] + if db_get container/archive${NUMBER}/source && [ "$RET" = true ] then echo "deb-src ${REPOSITORY}" >> "${DEBCONF_TMPDIR}/apt/${LIST}" fi KEY="" - if db_get cnt-debconf/archive${NUMBER}/key + if db_get container/archive${NUMBER}/key then KEY="${RET}" @@ -662,16 +661,16 @@ Local_archives () PREFERENCES_PACKAGE="" PREFERENCES_PIN="" PREFERENCES_PIN_PRIORITY="" - if db_get cnt-debconf/archive${NUMBER}/preferences-package + if db_get container/archive${NUMBER}/preferences-package then PREFERENCES_PACKAGE="${RET}" - if db_get cnt-debconf/archive${NUMBER}/preferences-pin + if db_get container/archive${NUMBER}/preferences-pin then PREFERENCES_PIN="${RET}" fi - if db_get cnt-debconf/archive${NUMBER}/preferences-pin-priority + if db_get container/archive${NUMBER}/preferences-pin-priority then PREFERENCES_PIN_PRIORITY="${RET}" fi @@ -722,97 +721,97 @@ Network_defaults () Network () { - db_get cnt-debconf/network1/bridge + db_get container/network1/bridge NETWORK1_BRIDGE="${RET}" # string (w/o empty) - db_get cnt-debconf/network1/veth + db_get container/network1/veth NETWORK1_VETH="${RET}" # string (w/o empty) - db_get cnt-debconf/network1/ipv4-method + db_get container/network1/ipv4-method NETWORK1_IPV4_METHOD="${RET}" # select - db_get cnt-debconf/network1/ipv4-comment + db_get container/network1/ipv4-comment NETWORK1_IPV4_COMMENT="${RET}" # string (w/ empty) - db_get cnt-debconf/network1/ipv4-address + db_get container/network1/ipv4-address NETWORK1_IPV4_ADDRESS="${RET}" # string (w/o empty) - db_get cnt-debconf/network1/ipv4-gateway + db_get container/network1/ipv4-gateway NETWORK1_IPV4_GATEWAY="${RET}" # string (w/ empty) - db_get cnt-debconf/network1/ipv4-netmask + db_get container/network1/ipv4-netmask NETWORK1_IPV4_NETMASK="${RET}" # string (w/o empty) - db_get cnt-debconf/network1/ipv4-post-up + db_get container/network1/ipv4-post-up NETWORK1_IPV4_POST_UP="${RET}" # string (w/ empty) - db_get cnt-debconf/network1/ipv4-post-down + db_get container/network1/ipv4-post-down NETWORK1_IPV4_POST_DOWN="${RET}" # string (w/ empty) - db_get cnt-debconf/nameserver/server + db_get container/nameserver/server NAMESERVER_SERVER="${RET}" # string (w/ empty) - db_get cnt-debconf/nameserver/domain + db_get container/nameserver/domain NAMESERVER_DOMAIN="${RET}" # string (w/ empty) - db_get cnt-debconf/nameserver/search + db_get container/nameserver/search NAMESERVER_SEARCH="${RET}" # string (w/ empty) - db_get cnt-debconf/nameserver/options + db_get container/nameserver/options NAMESERVER_OPTIONS="${RET}" # string (w/ empty) Network_defaults - db_set cnt-debconf/network1/bridge "${NETWORK1_BRIDGE}" - db_fset cnt-debconf/network1/bridge seen false + db_set container/network1/bridge "${NETWORK1_BRIDGE}" + db_fset container/network1/bridge seen false - db_set cnt-debconf/network1/veth "${NETWORK1_VETH}" - db_fset cnt-debconf/network1/veth seen false + db_set container/network1/veth "${NETWORK1_VETH}" + db_fset container/network1/veth seen false - db_set cnt-debconf/network1/ipv4-method "${NETWORK1_IPV4_METHOD}" - db_fset cnt-debconf/network1/ipv4-method seen false + db_set container/network1/ipv4-method "${NETWORK1_IPV4_METHOD}" + db_fset container/network1/ipv4-method seen false - db_set cnt-debconf/network1/ipv4-comment "${NETWORK1_IPV4_COMMENT}" - db_fset cnt-debconf/network1/ipv4-comment seen false + db_set container/network1/ipv4-comment "${NETWORK1_IPV4_COMMENT}" + db_fset container/network1/ipv4-comment seen false - db_set cnt-debconf/network1/ipv4-address "${NETWORK1_IPV4_ADDRESS}" - db_fset cnt-debconf/network1/ipv4-address seen false + db_set container/network1/ipv4-address "${NETWORK1_IPV4_ADDRESS}" + db_fset container/network1/ipv4-address seen false - db_set cnt-debconf/network1/ipv4-gateway "${NETWORK1_IPV4_GATEWAY}" - db_fset cnt-debconf/network1/ipv4-gateway seen false + db_set container/network1/ipv4-gateway "${NETWORK1_IPV4_GATEWAY}" + db_fset container/network1/ipv4-gateway seen false - db_set cnt-debconf/network1/ipv4-netmask "${NETWORK1_IPV4_NETMASK}" - db_fset cnt-debconf/network1/ipv4-netmask seen false + db_set container/network1/ipv4-netmask "${NETWORK1_IPV4_NETMASK}" + db_fset container/network1/ipv4-netmask seen false - db_set cnt-debconf/network1/ipv4-post-up "${NETWORK1_IPV4_POST_UP}" - db_fset cnt-debconf/network1/ipv4-post-up seen false + db_set container/network1/ipv4-post-up "${NETWORK1_IPV4_POST_UP}" + db_fset container/network1/ipv4-post-up seen false - db_set cnt-debconf/network1/ipv4-post-down "${NETWORK1_IPV4_POST_DOWN}" - db_fset cnt-debconf/network1/ipv4-post-down seen false + db_set container/network1/ipv4-post-down "${NETWORK1_IPV4_POST_DOWN}" + db_fset container/network1/ipv4-post-down seen false - db_set cnt-debconf/nameserver/server "${NAMESERVER_SERVER}" - db_fset cnt-debconf/nameserver/server seen false + db_set container/nameserver/server "${NAMESERVER_SERVER}" + db_fset container/nameserver/server seen false - db_set cnt-debconf/nameserver/domain "${NAMESERVER_DOMAIN}" - db_fset cnt-debconf/nameserver/domain seen false + db_set container/nameserver/domain "${NAMESERVER_DOMAIN}" + db_fset container/nameserver/domain seen false - db_set cnt-debconf/nameserver/search "${NAMESERVER_SEARCH}" - db_fset cnt-debconf/nameserver/search seen false + db_set container/nameserver/search "${NAMESERVER_SEARCH}" + db_fset container/nameserver/search seen false - db_set cnt-debconf/nameserver/options "${NAMESERVER_OPTIONS}" - db_fset cnt-debconf/nameserver/options seen false + db_set container/nameserver/options "${NAMESERVER_OPTIONS}" + db_fset container/nameserver/options seen false - db_settitle cnt-debconf/title - db_input high cnt-debconf/network1/ipv4-method || true + db_settitle container/title + db_input high container/network1/ipv4-method || true db_go - db_get cnt-debconf/network1/bridge + db_get container/network1/bridge NETWORK1_BRIDGE="${RET}" # select - db_get cnt-debconf/network1/veth + db_get container/network1/veth NETWORK1_VETH="${RET}" # select - db_get cnt-debconf/network1/ipv4-method + db_get container/network1/ipv4-method NETWORK1_IPV4_METHOD="${RET}" # select case "${NETWORK1_IPV4_METHOD}" in @@ -820,81 +819,81 @@ Network () ;; static) - db_settitle cnt-debconf/title - db_input high cnt-debconf/network1/ipv4-comment || true + db_settitle container/title + db_input high container/network1/ipv4-comment || true db_go - db_settitle cnt-debconf/title - db_input high cnt-debconf/network1/ipv4-address || true + db_settitle container/title + db_input high container/network1/ipv4-address || true db_go - db_settitle cnt-debconf/title - db_input high cnt-debconf/network1/ipv4-gateway || true + db_settitle container/title + db_input high container/network1/ipv4-gateway || true db_go - db_settitle cnt-debconf/title - db_input high cnt-debconf/network1/ipv4-netmask || true + db_settitle container/title + db_input high container/network1/ipv4-netmask || true db_go - db_settitle cnt-debconf/title - db_input high cnt-debconf/network1/ipv4-post-up || true + db_settitle container/title + db_input high container/network1/ipv4-post-up || true db_go - db_settitle cnt-debconf/title - db_input high cnt-debconf/network1/ipv4-post-down || true + db_settitle container/title + db_input high container/network1/ipv4-post-down || true db_go - db_settitle cnt-debconf/title - db_input high cnt-debconf/nameserver/server || true + db_settitle container/title + db_input high container/nameserver/server || true db_go ;; esac NUMBER="1" - while db_get cnt-debconf/network${NUMBER}/ipv4-method && [ "${RET}" ] + while db_get container/network${NUMBER}/ipv4-method && [ "${RET}" ] do - if db_get cnt-debconf/network${NUMBER}/bridge + if db_get container/network${NUMBER}/bridge then eval NETWORK${NUMBER}_BRIDGE="\"${RET}\"" # string (w/o empty) fi - if db_get cnt-debconf/network${NUMBER}/veth + if db_get container/network${NUMBER}/veth then eval NETWORK${NUMBER}_VETH="\"${RET}\"" # string (w/o empty) fi - if db_get cnt-debconf/network${NUMBER}/ipv4-comment + if db_get container/network${NUMBER}/ipv4-comment then eval NETWORK${NUMBER}_IPV4_COMMENT="\"${RET}\"" # string (w/ empty) fi - if db_get cnt-debconf/network${NUMBER}/ipv4-method + if db_get container/network${NUMBER}/ipv4-method then eval NETWORK${NUMBER}_IPV4_METHOD="\"${RET}\"" # select fi - if db_get cnt-debconf/network${NUMBER}/ipv4-address + if db_get container/network${NUMBER}/ipv4-address then eval NETWORK${NUMBER}_IPV4_ADDRESS="\"${RET}\"" # string (w/o empty) fi - if db_get cnt-debconf/network${NUMBER}/ipv4-gateway + if db_get container/network${NUMBER}/ipv4-gateway then eval NETWORK${NUMBER}_IPV4_GATEWAY="\"${RET}\"" # string (w/ empty) fi - if db_get cnt-debconf/network${NUMBER}/ipv4-netmask + if db_get container/network${NUMBER}/ipv4-netmask then eval NETWORK${NUMBER}_IPV4_NETMASK="\"${RET}\"" # string (w/o empty) fi - if db_get cnt-debconf/network${NUMBER}/ipv4-post-up + if db_get container/network${NUMBER}/ipv4-post-up then eval NETWORK${NUMBER}_IPV4_POST_UP="\"${RET}\"" # string (w/ empty) fi - if db_get cnt-debconf/network${NUMBER}/ipv4-post-down + if db_get container/network${NUMBER}/ipv4-post-down then eval NETWORK${NUMBER}_IPV4_POST_DOWN="\"${RET}\"" # string (w/ empty) fi @@ -904,16 +903,16 @@ Network () NETWORK_NUMBER="$((${NUMBER} - 1))" - db_get cnt-debconf/nameserver/server + db_get container/nameserver/server NAMESERVER_SERVER="${RET}" # string (w/ empty) - db_get cnt-debconf/nameserver/domain + db_get container/nameserver/domain NAMESERVER_DOMAIN="${RET}" # string (w/ empty) - db_get cnt-debconf/nameserver/search + db_get container/nameserver/search NAMESERVER_SEARCH="${RET}" # string (w/ empty) - db_get cnt-debconf/nameserver/options + db_get container/nameserver/options NAMESERVER_OPTIONS="${RET}" # string (w/ empty) Network_defaults @@ -958,7 +957,7 @@ Network () Root_password () { - if db_get cnt-debconf/root-password + if db_get container/root-password then ROOT_PASSWORD="${RET}" # string (w/o empty) fi @@ -968,14 +967,14 @@ Root_password () # Create a random password as suggestion for the user RANDOM_PASSWORD="$(dd if=/dev/urandom bs=12 count=1 2> /dev/null | base64)" - db_set cnt-debconf/root-password ${RANDOM_PASSWORD} - db_fset cnt-debconf/root-password seen false + db_set container/root-password ${RANDOM_PASSWORD} + db_fset container/root-password seen false - db_settitle cnt-debconf/title - db_input high cnt-debconf/root-password || true + db_settitle container/title + db_input high container/root-password || true db_go - db_get cnt-debconf/root-password + db_get container/root-password ROOT_PASSWORD="${RET}" if [ -z "${ROOT_PASSWORD}" ] @@ -995,14 +994,14 @@ Root_password () Internal_options () { - if db_get cnt-debconf/apt-recommends + if db_get container/apt-recommends then APT_RECOMMENDS="${RET}" # boolean (w/ empty) fi echo "APT_RECOMMENDS=\"${APT_RECOMMENDS}\"" >> "${DEBCONF_TMPDIR}/debconf.default" - if db_get cnt-debconf/debconf-frontend + if db_get container/debconf-frontend then DEBCONF_FRONTEND="${RET}" # select fi @@ -1010,7 +1009,7 @@ Internal_options () DEBCONF_FRONTEND="${DEBCONF_FRONTEND:-dialog}" echo "DEBCONF_FRONTEND=\"${DEBCONF_FRONTEND}\"" >> "${DEBCONF_TMPDIR}/debconf.default" - if db_get cnt-debconf/debconf-priority + if db_get container/debconf-priority then DEBCONF_PRIORITY="${RET}" # select fi @@ -1018,7 +1017,7 @@ Internal_options () DEBCONF_PRIORITY="${DEBCONF_PRIORITY:-high}" echo "DEBCONF_PRIORITY=\"${DEBCONF_PRIORITY}\"" >> "${DEBCONF_TMPDIR}/debconf.default" - if db_get cnt-debconf/container-command + if db_get container/container-command then CONTAINER_COMMAND="${RET}" # string (w/ empty) fi @@ -1027,9 +1026,9 @@ Internal_options () NUMBER="1" - while db_get cnt-debconf/container-command${NUMBER} && [ "${RET}" ] + while db_get container/container-command${NUMBER} && [ "${RET}" ] do - if db_get cnt-debconf/container-command${NUMBER} + if db_get container/container-command${NUMBER} then eval CONTAINER_COMMAND${NUMBER}="\"${RET}\"" # string (w/o empty) fi @@ -1047,7 +1046,7 @@ Internal_options () echo "CONTAINER_COMMAND${NUMBER}=\"${COMMAND}\"" >> "${DEBCONF_TMPDIR}/debconf.default" done - if db_get cnt-debconf/host-command + if db_get container/host-command then HOST_COMMAND="${RET}" # string (w/ empty) fi @@ -1056,9 +1055,9 @@ Internal_options () NUMBER="1" - while db_get cnt-debconf/host-command${NUMBER} && [ "${RET}" ] + while db_get container/host-command${NUMBER} && [ "${RET}" ] do - if db_get cnt-debconf/host-command${NUMBER} + if db_get container/host-command${NUMBER} then eval HOST_COMMAND${NUMBER}="\"${RET}\"" # string (w/o empty) fi @@ -1076,7 +1075,7 @@ Internal_options () echo "HOST_COMMAND${NUMBER}=\"${COMMAND}\"" >> "${DEBCONF_TMPDIR}/debconf.default" done - if db_get cnt-debconf/auto + if db_get container/auto then CNT_AUTO="${RET:-true}" # string (w/o empty) fi @@ -1084,7 +1083,7 @@ Internal_options () CNT_AUTO="${CNT_AUTO:-true}" echo "CNT_AUTO=\"${CNT_AUTO}\"" >> "${DEBCONF_TMPDIR}/debconf.default" - if db_get cnt-debconf/container-server + if db_get container/container-server then CNT_CONTAINER_SERVER="${RET:-FQDN}" # string (w/o empty) fi @@ -1099,14 +1098,14 @@ Internal_options () echo "CNT_CONTAINER_SERVER=\"${CNT_CONTAINER_SERVER}\"" >> "${DEBCONF_TMPDIR}/debconf.default" - if db_get cnt-debconf/bind + if db_get container/bind then BIND="${RET}" # string (w/ empty) fi echo "BIND=\"${BIND}\"" >> "${DEBCONF_TMPDIR}/debconf.default" - if db_get cnt-debconf/overlay + if db_get container/overlay then CNT_OVERLAY="${RET}" # string (w/ empty) fi diff --git a/share/scripts/debconf.d/0003-debconf.templates b/share/scripts/debconf.d/0003-debconf.templates index e3dbc24..3d607a7 100644 --- a/share/scripts/debconf.d/0003-debconf.templates +++ b/share/scripts/debconf.d/0003-debconf.templates @@ -1,8 +1,8 @@ -Template: cnt-debconf/title +Template: container/title Type: title -Description: container-tools +Description: compute-tools -Template: cnt-debconf/mode +Template: container/mode Type: select Default: Choices-C: ${CHOICES_C} @@ -10,7 +10,7 @@ Choices: ${CHOICES} Description: Mode Mode. -Template: cnt-debconf/distribution +Template: container/distribution Type: select Default: Choices-C: ${CHOICES_C} @@ -18,7 +18,7 @@ Choices: ${CHOICES} Description: Distribution Distribution. -Template: cnt-debconf/parent-distribution +Template: container/parent-distribution Type: select Default: Choices-C: ${CHOICES_C} @@ -26,7 +26,7 @@ Choices: ${CHOICES} Description: for internal use; can be preseeded Parent Distribution. -Template: cnt-debconf/architecture +Template: container/architecture Type: select Default: Choices-C: ${CHOICES_C} @@ -34,7 +34,7 @@ Choices: ${CHOICES} Description: Architecture Architecture. -Template: cnt-debconf/archives +Template: container/archives Type: multiselect Default: Choices-C: ${CHOICES_C} @@ -42,7 +42,7 @@ Choices: ${CHOICES} Description: Archives Archives. -Template: cnt-debconf/parent-archives +Template: container/parent-archives Type: multiselect Default: Choices-C: ${CHOICES_C} @@ -50,69 +50,69 @@ Choices: ${CHOICES} Description: Parent Archives Parent Archives. -Template: cnt-debconf/mirror +Template: container/mirror Type: string Default: Description: Mirror Mirror. -Template: cnt-debconf/mirror-security +Template: container/mirror-security Type: string Default: Description: Mirror Security Mirror Security. -Template: cnt-debconf/parent-mirror +Template: container/parent-mirror Type: string Default: Description: Parent Mirror Parent Mirror. -Template: cnt-debconf/parent-mirror-security +Template: container/parent-mirror-security Type: string Default: Description: Parent Mirror Security Parent Mirror Security. -Template: cnt-debconf/archive-areas +Template: container/archive-areas Type: multiselect Default: Choices: ${CHOICES} Description: Archive Areas Archive Areas. -Template: cnt-debconf/parent-archive-areas +Template: container/parent-archive-areas Type: multiselect Default: Choices: ${CHOICES} Description: Parent Archive Areas Parent Archive Areas. -Template: cnt-debconf/packages +Template: container/packages Type: string Default: Description: Packages Packages. -Template: cnt-debconf/root-password +Template: container/root-password Type: string Default: Description: Root password Root password. -Template: cnt-debconf/network1/bridge +Template: container/network1/bridge Type: string Default: Description: Bridge Bridge. -Template: cnt-debconf/network1/veth +Template: container/network1/veth Type: string Default: Description: Veth name Veth name. -Template: cnt-debconf/network1/ipv4-method +Template: container/network1/ipv4-method Type: select Choices: dhcp, static, none Default: @@ -122,7 +122,7 @@ Description: Ethernet Interface Method (IPv4)? This defaults to dhcp and will require that you run a dhcp-server in your network. -Template: cnt-debconf/network1/ipv4-comment +Template: container/network1/ipv4-comment Type: string Default: Description: Ethernet Interface Comment (IPv4)? @@ -130,7 +130,7 @@ Description: Ethernet Interface Comment (IPv4)? . This defaults to empty. -Template: cnt-debconf/network1/ipv4-address +Template: container/network1/ipv4-address Type: string Default: Description: Ethernet IP Address (IPv4)? @@ -138,7 +138,7 @@ Description: Ethernet IP Address (IPv4)? . This defaults to 192.168.1.2. -Template: cnt-debconf/network1/ipv4-gateway +Template: container/network1/ipv4-gateway Type: string Default: Description: Ethernet Gateway Address (IPv4)? @@ -146,7 +146,7 @@ Description: Ethernet Gateway Address (IPv4)? . This defaults to empty. -Template: cnt-debconf/network1/ipv4-netmask +Template: container/network1/ipv4-netmask Type: string Default: Description: Ethernet Network Mask (IPv4)? @@ -154,7 +154,7 @@ Description: Ethernet Network Mask (IPv4)? . This defaults to empty. -Template: cnt-debconf/network1/ipv4-post-up +Template: container/network1/ipv4-post-up Type: string Default: Description: Ethernet post-up Command (IPv4)? @@ -162,7 +162,7 @@ Description: Ethernet post-up Command (IPv4)? . This defaults to empty. -Template: cnt-debconf/network1/ipv4-post-down +Template: container/network1/ipv4-post-down Type: string Default: Description: Ethernet post-down Command (IPv4)? @@ -170,7 +170,7 @@ Description: Ethernet post-down Command (IPv4)? . This defaults to empty. -Template: cnt-debconf/nameserver/server +Template: container/nameserver/server Type: string Default: Description: Nameserver Addresses? @@ -178,7 +178,7 @@ Description: Nameserver Addresses? . This defaults to empty. Multiple nameservers can be separated by whitespace. -Template: cnt-debconf/nameserver/domain +Template: container/nameserver/domain Type: string Default: Description: Nameserver Local Domain Name? @@ -188,7 +188,7 @@ Description: Nameserver Local Domain Name? . This defaults to empty. -Template: cnt-debconf/nameserver/search +Template: container/nameserver/search Type: string Default: Description: Nameserver Search List? @@ -198,7 +198,7 @@ Description: Nameserver Search List? . This defaults to empty. -Template: cnt-debconf/nameserver/options +Template: container/nameserver/options Type: string Default: Description: Nameserver Resolver Options? diff --git a/share/scripts/debootstrap b/share/scripts/debootstrap index 12f1b95..4af851a 100755 --- a/share/scripts/debootstrap +++ b/share/scripts/debootstrap @@ -1,7 +1,6 @@ #!/bin/sh -# container-tools - Manage systemd-nspawn containers -# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net> +# Copyright (C) 2014-2019 Daniel Baumann <daniel.baumann@open-infrastructure.net> # # SPDX-License-Identifier: GPL-3.0+ # @@ -22,7 +21,7 @@ set -e SCRIPT="${0}" -HOOKS="/etc/container-tools/hooks" +HOOKS="/etc/compute-tools/container/hooks" MACHINES="/var/lib/machines" Parameters () @@ -138,7 +137,7 @@ then fi ARCHITECTURE="${ARCHITECTURE:-$(dpkg --print-architecture)}" -DISTRIBUTION="${DISTRIBUTION:-stretch}" +DISTRIBUTION="${DISTRIBUTION:-buster}" MIRROR="${MIRROR:-https://deb.debian.org/debian}" PASSWORD="${PASSWORD:-$(dd if=/dev/urandom bs=12 count=1 2> /dev/null | base64)}" |