From 2c1c6b8f2775419c628e89c91c751a4cfb12da61 Mon Sep 17 00:00:00 2001 From: Katharina Drexel Date: Thu, 25 Feb 2021 14:54:06 +0100 Subject: Integrating mmdebstrap in debconf script. Signed-off-by: Katharina Drexel Signed-off-by: Daniel Baumann --- share/scripts/debconf | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'share/scripts') diff --git a/share/scripts/debconf b/share/scripts/debconf index 28c5262..c6cc0ec 100755 --- a/share/scripts/debconf +++ b/share/scripts/debconf @@ -115,9 +115,14 @@ then exit 1 fi -if [ ! -x /usr/sbin/debootstrap ] +if [ -x /usr/sbin/debootstrap ] then - echo "'${NAME}': /usr/sbin/debootstrap - no such file." >&2 + BOOTSTRAP="debootstrap" +elif [ -x /usr/bin/mmdebstrap ] +then + BOOTSTRAP="mmdebstrap" +else + echo "'${NAME}': /usr/sbin/debootstrap or /usr/bin/mmdebstrap - no such file." >&2 exit 1 fi @@ -390,8 +395,23 @@ Debootstrap () esac mkdir -p "$(dirname ${DIRECTORY})" - debootstrap --verbose --arch=${ARCHITECTURE} --components=${PARENT_ARCHIVE_AREAS} \ - --exclude=${EXCLUDE} --include=${INCLUDE} ${PARENT_DISTRIBUTION} "${DIRECTORY}" ${PARENT_MIRROR} + + case "${BOOTSTRAP}" in + debootstrap) + debootstrap --verbose --arch=${ARCHITECTURE} --components=${PARENT_ARCHIVE_AREAS} \ + --exclude=${EXCLUDE} --include=${INCLUDE} ${PARENT_DISTRIBUTION} "${DIRECTORY}" ${PARENT_MIRROR} + ;; + + mmdebstrap) + mmdebstrap --verbose --arch=${ARCHITECTURE} --components=${PARENT_ARCHIVE_AREAS} \ + --mode=root --include=${INCLUDE} ${PARENT_DISTRIBUTION} "${DIRECTORY}" ${PARENT_MIRROR} + ;; + + *) + echo "'${NAME}': ${BOOTSTRAP} - not supported" >&2 + exit 1 + ;; + esac } Configure_apt () -- cgit v1.2.3