From 56a34c9306d3bc198338bfd0dc7d0d9ef04eb83a Mon Sep 17 00:00:00 2001 From: Salt Date: Wed, 2 Dec 2020 19:20:45 -0600 Subject: [PATCH] Use digests and not digests.asc --- gentoostrap.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gentoostrap.sh b/gentoostrap.sh index e4ce2fa..dd20df3 100755 --- a/gentoostrap.sh +++ b/gentoostrap.sh @@ -98,25 +98,25 @@ build-gentoo() { | head -n 1 )" stage3file="/tmp/tmp.$USER.$_name.stage3.tar.xz" - stage3sig="/tmp/tmp.$USER.$_name.stage3.tar.xz.DIGESTS.asc" + stage3sig="/tmp/tmp.$USER.$_name.stage3.tar.xz.DIGESTS" for file in "$stage3file" "$stage3sig"; do touch "$file" chmod 0600 "$file" done trap "cleanup $stage3file" EXIT - # We grab the signature first to verify the integrity of any tarball leftover from a previous run + # We grab the checksums first to verify the integrity of any tarball leftover from a previous run log "Downloading stage3 signature" - curl -s "$stage3.DIGESTS.asc" -o "$stage3sig" + curl -s "$stage3.DIGESTS" -o "$stage3sig" if ! [ -f "$stage3file" ]; then log "Downloading stage3" curl -s "$stage3" -o "$stage3file" elif ! openssl dgst -r -sha512 "$stage3file"; then - log "Signature verification failed; downloading new stage3" + log "Checksum verification failed; downloading new stage3" curl -s "$stage3" -o "$stage3file" fi # At this point, we should have a new stage3 that matches our signature; die of not if ! openssl dgst -r -sha512 "$stage3file"; then - error "stage3 signature verification failed" 50 + error "stage3 checksum verification failed" 50 fi log "Decompressing tarball; this will prompt for root privileges" sudo tar xf "$stage3file" -C "$_optdest"