Refactor get_netbsd() to add create_vm() compatibility

This commit is contained in:
Martin Wimpress 2022-02-23 10:51:01 +00:00
parent c928d6caee
commit 68609f11e8
No known key found for this signature in database
GPG key ID: 61DF940515E06DA3

View file

@ -1000,15 +1000,10 @@ function get_netboot() {
function get_netbsd() { function get_netbsd() {
local HASH="" local HASH=""
local ISO="" local ISO="NetBSD-${RELEASE}-amd64.iso"
local URL="" local URL="https://cdn.netbsd.org/pub/NetBSD/NetBSD-${RELEASE}/images/"
URL="https://cdn.netbsd.org/pub/NetBSD/NetBSD-${RELEASE}/images/"
ISO="NetBSD-${RELEASE}-amd64.iso"
HASH=$(wget -q -O- "${URL}/MD5" | grep "${ISO}" | cut -d' ' -f4) HASH=$(wget -q -O- "${URL}/MD5" | grep "${ISO}" | cut -d' ' -f4)
web_get "${URL}/${ISO}" "${VM_PATH}" echo "${URL}/${ISO} ${HASH}"
check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}"
} }
function get_nixos() { function get_nixos() {