Refactor get_freebsd() to add create_vm() compatibility

This commit is contained in:
Martin Wimpress 2022-02-23 10:32:53 +00:00
parent 8af32ca26c
commit 6941a797d4
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3
1 changed files with 4 additions and 8 deletions

View File

@ -798,15 +798,11 @@ function get_fedora() {
function get_freebsd() {
local HASH=""
local ISO=""
local URL=""
local ISO="FreeBSD-${RELEASE}-RELEASE-amd64-dvd1.iso"
local URL="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}"
URL="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}"
ISO="FreeBSD-${RELEASE}-RELEASE-amd64-dvd1.iso"
HASH=$(wget -q -O- "${URL}/CHECKSUM.SHA512-FreeBSD-${RELEASE}-RELEASE-amd64" | grep "${ISO}" | cut -d' ' -f4)
web_get "${URL}/${ISO}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}"
HASH=$(wget -q -O- "${URL}/CHECKSUM.SHA256-FreeBSD-${RELEASE}-RELEASE-amd64" | grep "${ISO}" | grep -v ".xz" | cut -d' ' -f4)
echo "${URL}/${ISO} ${HASH}"
}
function get_garuda() {