Refactor, and enable, OpenBSD support
This commit is contained in:
parent
94ecb1b3ec
commit
af7348caf6
3
quickemu
3
quickemu
@ -396,9 +396,6 @@ function vm_boot() {
|
|||||||
if [ "${guest_os}" == "freebsd" ]; then
|
if [ "${guest_os}" == "freebsd" ]; then
|
||||||
MOUSE="usb-mouse"
|
MOUSE="usb-mouse"
|
||||||
fi
|
fi
|
||||||
if [ "${guest_os}" == "openbsd" ]; then
|
|
||||||
OUTPUT="gtk"
|
|
||||||
fi
|
|
||||||
if [ -z "${disk_size}" ]; then
|
if [ -z "${disk_size}" ]; then
|
||||||
disk_size="16G"
|
disk_size="16G"
|
||||||
fi
|
fi
|
||||||
|
38
quickget
38
quickget
@ -34,6 +34,7 @@ function pretty_name() {
|
|||||||
linuxmint-mate) PRETTY_NAME="Linux Mint MATE";;
|
linuxmint-mate) PRETTY_NAME="Linux Mint MATE";;
|
||||||
linuxmint-xfce) PRETTY_NAME="Linux Mint XFCE";;
|
linuxmint-xfce) PRETTY_NAME="Linux Mint XFCE";;
|
||||||
macos) PRETTY_NAME="macOS";;
|
macos) PRETTY_NAME="macOS";;
|
||||||
|
openbsd) PRETTY_NAME="OpenBSD";;
|
||||||
opensuse) PRETTY_NAME="openSUSE";;
|
opensuse) PRETTY_NAME="openSUSE";;
|
||||||
popos) PRETTY_NAME="Pop!_OS";;
|
popos) PRETTY_NAME="Pop!_OS";;
|
||||||
ubuntu-budgie) PRETTY_NAME="Ubuntu Budgie";;
|
ubuntu-budgie) PRETTY_NAME="Ubuntu Budgie";;
|
||||||
@ -141,7 +142,7 @@ function releases_linuxmint(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function releases_openbsd(){
|
function releases_openbsd(){
|
||||||
echo 7_0
|
echo 7.0
|
||||||
}
|
}
|
||||||
|
|
||||||
function releases_opensuse(){
|
function releases_opensuse(){
|
||||||
@ -514,7 +515,7 @@ function make_vm_config() {
|
|||||||
elif [[ "${OS}" == *"linuxmint"* ]]; then
|
elif [[ "${OS}" == *"linuxmint"* ]]; then
|
||||||
GUEST="linux"
|
GUEST="linux"
|
||||||
IMAGE_TYPE="iso"
|
IMAGE_TYPE="iso"
|
||||||
elif [[ "${OS}" == "openbsd" ]]; then
|
elif [ "${OS}" == "openbsd" ]; then
|
||||||
GUEST="openbsd"
|
GUEST="openbsd"
|
||||||
IMAGE_TYPE="iso"
|
IMAGE_TYPE="iso"
|
||||||
elif [ "${OS}" == "opensuse" ]; then
|
elif [ "${OS}" == "opensuse" ]; then
|
||||||
@ -545,6 +546,10 @@ EOF
|
|||||||
echo "fixed_iso=\"${VM_PATH}/${ISO_FILE}\"" >> "${OS}-${RELEASE}.conf"
|
echo "fixed_iso=\"${VM_PATH}/${ISO_FILE}\"" >> "${OS}-${RELEASE}.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${OS}" == "openbsd" ]; then
|
||||||
|
echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${OS}" == "macos" ]; then
|
if [ "${OS}" == "macos" ]; then
|
||||||
echo "macos_release=\"${RELEASE}\"" >> "${OS}-${RELEASE}.conf"
|
echo "macos_release=\"${RELEASE}\"" >> "${OS}-${RELEASE}.conf"
|
||||||
fi
|
fi
|
||||||
@ -620,26 +625,17 @@ function get_linuxmint() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_openbsd() {
|
function get_openbsd() {
|
||||||
|
local HASH=""
|
||||||
|
local ISO=""
|
||||||
local URL=""
|
local URL=""
|
||||||
local DL_BASE="https://cdn.openbsd.org/pub/OpenBSD/7.0/amd64/"
|
|
||||||
local VERSION=""
|
|
||||||
|
|
||||||
case ${RELEASE} in
|
validate_release "releases_openbsd"
|
||||||
7_0) VERSION=${RELEASE//_/};;
|
ISO="install${RELEASE//\./}.iso"
|
||||||
*)
|
URL="https://cdn.openbsd.org/pub/OpenBSD/${RELEASE}/amd64/${ISO}"
|
||||||
echo "ERROR! OpenBSD ${RELEASE} is not a supported release."
|
HASH=$(wget -q -O- "https://cdn.openbsd.org/pub/OpenBSD/${RELEASE}/amd64/SHA256" | grep "${ISO}" | cut -d' ' -f4)
|
||||||
releases_openbsd
|
web_get "${URL}" "${VM_PATH}"
|
||||||
exit 1
|
check_hash "${ISO}" "${HASH}"
|
||||||
;;
|
make_vm_config "${ISO}"
|
||||||
esac
|
|
||||||
|
|
||||||
URL="${DL_BASE}/install${VERSION}.iso"
|
|
||||||
|
|
||||||
ISO="install${VERSION}.iso"
|
|
||||||
make_vm_dir
|
|
||||||
web_get ${URL} ${VM_PATH}
|
|
||||||
make_vm_config ${ISO}
|
|
||||||
start_vm_info
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_opensuse() {
|
function get_opensuse() {
|
||||||
@ -882,6 +878,8 @@ if [ -n "${2}" ]; then
|
|||||||
get_fedora
|
get_fedora
|
||||||
elif [[ "${OS}" == *"linuxmint"* ]]; then
|
elif [[ "${OS}" == *"linuxmint"* ]]; then
|
||||||
get_linuxmint
|
get_linuxmint
|
||||||
|
elif [ "${OS}" == "openbsd" ]; then
|
||||||
|
get_openbsd
|
||||||
elif [ "${OS}" == "opensuse" ]; then
|
elif [ "${OS}" == "opensuse" ]; then
|
||||||
get_opensuse
|
get_opensuse
|
||||||
elif [ "${OS}" == "popos" ]; then
|
elif [ "${OS}" == "popos" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user