Refactor FreeBSD support

This commit is contained in:
Martin Wimpress 2021-10-07 16:36:38 +01:00
parent c060214412
commit 1adf80a42e
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3
2 changed files with 6 additions and 19 deletions

View File

@ -254,11 +254,8 @@ quickemu --vm windows-11.conf
* Enables USB SPICE pass-through between the host and guest. * Enables USB SPICE pass-through between the host and guest.
### FreeBSD Guest ### FreeBSD Guest
`quickemu` supports FreeBSD production releases. FreeBSD support is maintained by `<kai@potabi.com>`.
FreeBSD version command reference (just in case): `quickemu` supports FreeBSD production releases. FreeBSD support is maintained by `<kai@potabi.com>`.
* 12.2: `12_2`
* 13.0: `13_0`
```bash ```bash
quickget freebsd 13_0 quickget freebsd 13_0

View File

@ -15,9 +15,8 @@ function os_support() {
} }
function releases_freebsd(){ function releases_freebsd(){
echo 13_0 \ echo 12_2 \
12_2 # replace with 12.3 upon release 13_0
# 14_0 # Waiting for 14.0 release
} }
function releases_macos() { function releases_macos() {
@ -181,25 +180,16 @@ function start_vm_info() {
function get_freebsd() { function get_freebsd() {
# For future releases, use dvd1 iso files. # For future releases, use dvd1 iso files.
local URL="" local URL=""
local CHECKSUMS=""
local DL_BASE="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES" local DL_BASE="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES"
local VERSION="" local VERSION=""
case ${RELEASE} in case ${RELEASE} in
13_0) 12_2|13_0) VERSION=${RELEASE//_/.};;
VERSION="13.0"
;;
12_2)
VERSION="12.2"
;;
# Waiting until FreeBSD 14 release
# 14_0)
# VERSION="14.0"
# ;;
*) *)
echo "ERROR! FreeBSD ${RELEASE} is not a supported release." echo "ERROR! FreeBSD ${RELEASE} is not a supported release."
releases_freebsd releases_freebsd
exit 1 exit 1
;; ;;
esac esac
URL="${DL_BASE}/${VERSION}/FreeBSD-${VERSION}-RELEASE-amd64-dvd1.iso" URL="${DL_BASE}/${VERSION}/FreeBSD-${VERSION}-RELEASE-amd64-dvd1.iso"