summaryrefslogtreecommitdiffstats
path: root/debootstrap
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-02-21 23:44:54 (GMT)
committerJoey Hess <joey@kitenet.net>2011-02-22 00:25:38 (GMT)
commitee850e1177eb06d31a1b5b83c4c0d12734d18b26 (patch)
tree6a34ac56aed8fe49da19474e44a4fea8167517ac /debootstrap
parent562b0f8159e468ed783506dd73017958e1286be9 (diff)
downloaddebootstrap-ee850e1177eb06d31a1b5b83c4c0d12734d18b26.zip
debootstrap-ee850e1177eb06d31a1b5b83c4c0d12734d18b26.tar.gz
debootstrap-ee850e1177eb06d31a1b5b83c4c0d12734d18b26.tar.bz2
sha checksum support
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