From 94ecb1b3ec9ff3e257f731c5b8f6a89ccf5e8d4f Mon Sep 17 00:00:00 2001 From: Fabian Schmidt Date: Wed, 20 Oct 2021 23:07:07 +0200 Subject: [PATCH] added openbsd 7 support (#129) Co-authored-by: Fabian Schmidt --- quickemu | 5 ++++- quickget | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/quickemu b/quickemu index 609afa9..5cb857d 100755 --- a/quickemu +++ b/quickemu @@ -388,7 +388,7 @@ function vm_boot() { # Make any OS specific adjustments case ${guest_os} in - freebsd|linux) + freebsd|linux|openbsd) CPU="-cpu host,kvm=on" if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then CPU="${CPU},topoext" @@ -396,6 +396,9 @@ function vm_boot() { if [ "${guest_os}" == "freebsd" ]; then MOUSE="usb-mouse" fi + if [ "${guest_os}" == "openbsd" ]; then + OUTPUT="gtk" + fi if [ -z "${disk_size}" ]; then disk_size="16G" fi diff --git a/quickget b/quickget index 331f45e..a9dd279 100755 --- a/quickget +++ b/quickget @@ -109,6 +109,7 @@ function os_support() { linuxmint-xfce \ lubuntu \ macos \ + openbsd \ opensuse \ popos \ ubuntu \ @@ -139,6 +140,10 @@ function releases_linuxmint(){ echo 20.2 } +function releases_openbsd(){ + echo 7_0 +} + function releases_opensuse(){ echo 15.0 \ 15.1 \ @@ -509,6 +514,9 @@ function make_vm_config() { elif [[ "${OS}" == *"linuxmint"* ]]; then GUEST="linux" IMAGE_TYPE="iso" + elif [[ "${OS}" == "openbsd" ]]; then + GUEST="openbsd" + IMAGE_TYPE="iso" elif [ "${OS}" == "opensuse" ]; then GUEST="linux" IMAGE_TYPE="iso" @@ -611,6 +619,29 @@ function get_linuxmint() { make_vm_config "${ISO}" } +function get_openbsd() { + local URL="" + local DL_BASE="https://cdn.openbsd.org/pub/OpenBSD/7.0/amd64/" + local VERSION="" + + case ${RELEASE} in + 7_0) VERSION=${RELEASE//_/};; + *) + echo "ERROR! OpenBSD ${RELEASE} is not a supported release." + releases_openbsd + exit 1 + ;; + 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() { local ISO="" local RELEASES="" @@ -902,6 +933,8 @@ else releases_linuxmint elif [ "${OS}" == "opensuse" ]; then releases_opensuse + elif [ "${OS}" == "openbsd" ]; then + releases_openbsd elif [ "${OS}" == "macos" ]; then releases_macos elif [ "${OS}" == "popos" ]; then