Skip to content

Commit c8d52fe

Browse files
kraaigh2o
authored andcommitted
Use SHA-256
sha1sums.txt is no longer available on the mirror, so switch to SHA-256.
1 parent 6425f4d commit c8d52fe

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

install.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,15 +279,15 @@ prompt_for_destruction() {
279279
download_and_verify() {
280280
local file_url="$1"
281281
local local_path="$2"
282-
local expected_sha1="$3"
282+
local expected_sha256="$3"
283283
for try in {0..3}; do
284284
if [ ${try} -eq 0 ]; then
285285
[ -e "${local_path}" ] || continue
286286
else
287287
wget -O "${local_path}" "${file_url}"
288288
fi
289-
set -- $(sha1sum "${local_path}")
290-
if [ $1 = "${expected_sha1}" ]; then
289+
set -- $(sha256sum "${local_path}")
290+
if [ $1 = "${expected_sha256}" ]; then
291291
return 0
292292
else
293293
rm -f "${local_path}"
@@ -405,14 +405,14 @@ stage1_install() {
405405
chmod 0444 /d2a/work/doroot/README
406406

407407
log "Downloading bootstrap tarball ..."
408-
set -- $(wget -qO- ${archlinux_mirror}/iso/latest/sha1sums.txt |
408+
set -- $(wget -qO- ${archlinux_mirror}/iso/latest/sha256sums.txt |
409409
grep "archlinux-bootstrap-[^-]*-${target_architecture}.tar.gz")
410-
local expected_sha1=$1
410+
local expected_sha256=$1
411411
local bootstrap_filename=$2
412412
download_and_verify \
413413
${archlinux_mirror}/iso/latest/${bootstrap_filename} \
414414
/d2a/bootstrap.tar.gz \
415-
${expected_sha1}
415+
${expected_sha256}
416416

417417
log "Extracting bootstrap tarball ..."
418418
tar -xzf /d2a/bootstrap.tar.gz \

0 commit comments

Comments
 (0)