Add hash checking for openSUSE
This commit is contained in:
parent
ffeabdabf2
commit
cae95e5b14
6
quickget
6
quickget
@ -642,22 +642,26 @@ function get_openbsd() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_opensuse() {
|
function get_opensuse() {
|
||||||
|
local HASH=""
|
||||||
local ISO=""
|
local ISO=""
|
||||||
local RELEASES=""
|
|
||||||
local URL=""
|
local URL=""
|
||||||
|
|
||||||
validate_release "releases_opensuse"
|
validate_release "releases_opensuse"
|
||||||
if [ "${RELEASE}" == "tumbleweed" ]; then
|
if [ "${RELEASE}" == "tumbleweed" ]; then
|
||||||
ISO="openSUSE-Tumbleweed-DVD-x86_64-Current.iso"
|
ISO="openSUSE-Tumbleweed-DVD-x86_64-Current.iso"
|
||||||
URL="https://download.opensuse.org/tumbleweed/iso/${ISO}"
|
URL="https://download.opensuse.org/tumbleweed/iso/${ISO}"
|
||||||
|
HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1)
|
||||||
elif [ "${RELEASE}" == "microos" ]; then
|
elif [ "${RELEASE}" == "microos" ]; then
|
||||||
ISO="openSUSE-MicroOS-DVD-x86_64-Current.iso"
|
ISO="openSUSE-MicroOS-DVD-x86_64-Current.iso"
|
||||||
URL="https://download.opensuse.org/tumbleweed/iso/${ISO}"
|
URL="https://download.opensuse.org/tumbleweed/iso/${ISO}"
|
||||||
|
HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1)
|
||||||
else
|
else
|
||||||
ISO="openSUSE-Leap-${RELEASE}-DVD-x86_64.iso"
|
ISO="openSUSE-Leap-${RELEASE}-DVD-x86_64.iso"
|
||||||
URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso/${ISO}"
|
URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso/${ISO}"
|
||||||
|
HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1)
|
||||||
fi
|
fi
|
||||||
web_get "${URL}" "${VM_PATH}"
|
web_get "${URL}" "${VM_PATH}"
|
||||||
|
check_hash "${ISO}" "${HASH}"
|
||||||
make_vm_config "${ISO}"
|
make_vm_config "${ISO}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user