From cae95e5b14a9324c6856d1df5539831356d7abe2 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Thu, 21 Oct 2021 00:56:25 +0100 Subject: [PATCH] Add hash checking for openSUSE --- quickget | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/quickget b/quickget index 71af89f..0227c21 100755 --- a/quickget +++ b/quickget @@ -642,22 +642,26 @@ function get_openbsd() { } function get_opensuse() { + local HASH="" local ISO="" - local RELEASES="" local URL="" validate_release "releases_opensuse" if [ "${RELEASE}" == "tumbleweed" ]; then ISO="openSUSE-Tumbleweed-DVD-x86_64-Current.iso" URL="https://download.opensuse.org/tumbleweed/iso/${ISO}" + HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1) elif [ "${RELEASE}" == "microos" ]; then ISO="openSUSE-MicroOS-DVD-x86_64-Current.iso" URL="https://download.opensuse.org/tumbleweed/iso/${ISO}" + HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1) else ISO="openSUSE-Leap-${RELEASE}-DVD-x86_64.iso" URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso/${ISO}" + HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1) fi web_get "${URL}" "${VM_PATH}" + check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" }