summaryrefslogtreecommitdiffstats
path: root/debootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'debootstrap')
-rwxr-xr-xdebootstrap11
1 files changed, 10 insertions, 1 deletions
diff --git a/debootstrap b/debootstrap
index 0fc16d4..2fe633a 100755
--- a/debootstrap
+++ b/debootstrap
@@ -412,7 +412,16 @@ else
CHROOT_CMD="chroot $TARGET"
fi
-export ARCH SUITE TARGET CHROOT_CMD
+if [ -z "$SHA_SIZE" ]; then
+ SHA_SIZE=256
+fi
+if ! [ -x "/usr/bin/sha${SHA_SIZE}sum" ] && \
+ ! [ -x "/bin/sha${SHA_SIZE}sum" ]; then
+ SHA_SIZE=1
+fi
+DEBOOTSTRAP_CHECKSUM_FIELD="SHA$SHA_SIZE"
+
+export ARCH SUITE TARGET CHROOT_CMD SHA_SIZE DEBOOTSTRAP_CHECKSUM_FIELD
if am_doing_phase first_stage second_stage; then
if [ -x /usr/bin/id ] && [ `id -u` -ne 0 ]; then