summaryrefslogtreecommitdiffstats
path: root/share/scripts/debconf
diff options
context:
space:
mode:
authorKatharina Drexel <katharina.drexel@bfh.ch>2021-02-25 13:54:06 +0000
committerKatharina Drexel <katharina.drexel@bfh.ch>2021-04-12 16:44:17 +0000
commit8f3f6c5324119b2167eefce06d321ba54fba797a (patch)
tree2a11b9d28d8cf183e57be0d375f3227a0b36df1f /share/scripts/debconf
parentUpdating unit file for systemd 246 wrt/ StandardError and StandardOutput opti... (diff)
downloadcompute-tools-8f3f6c5324119b2167eefce06d321ba54fba797a.tar.xz
compute-tools-8f3f6c5324119b2167eefce06d321ba54fba797a.zip
Integrating mmdebstrap in debconf script.
Signed-off-by: Katharina Drexel <katharina.drexel@bfh.ch>
Diffstat (limited to 'share/scripts/debconf')
-rwxr-xr-xshare/scripts/debconf28
1 files changed, 24 insertions, 4 deletions
diff --git a/share/scripts/debconf b/share/scripts/debconf
index 28c5262..a7293a2 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_PROGRAM="debootstrap"
+elif [ -x /usr/bin/mmdebstrap ]
+then
+ BOOTSTRAP_PROGRAM="mmdebstrap"
+else
+ echo "Install mmdebstrap or debootstrap before continuing." >&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_PROGRAM}" 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 "${BOOTSTRAP_PROGRAM} not supported." >&2
+ exit 1
+ ;;
+ esac
}
Configure_apt ()