refactor: rename HOST_OS to OS_RELEASE

This commit is contained in:
Martin Wimpress 2024-05-15 01:28:57 +01:00 committed by Martin Wimpress
parent eb661221ef
commit 7e5d26daab
1 changed files with 4 additions and 4 deletions

View File

@ -1043,7 +1043,7 @@ function vm_boot() {
KERNEL_NAME="Unknown"
KERNEL_NODE=""
KERNEL_VER="?"
local HOST_OS="Unknown OS"
OS_RELEASE="Unknown OS"
MACHINE_TYPE="${MACHINE_TYPE:-q35}"
MAC_BOOTLOADER=""
MAC_MISSING=""
@ -1063,14 +1063,14 @@ function vm_boot() {
if [ ${DARWIN} -eq 1 ]; then
# Get macOS product name and version using swvers
if [ -x "$(command -v sw_vers)" ]; then
HOST_OS="$(sw_vers --productName) $(sw_vers --productVersion)"
OS_RELEASE="$(sw_vers --productName) $(sw_vers --productVersion)"
fi
elif [ -e /etc/os-release ]; then
HOST_OS=$(grep PRETTY_NAME /etc/os-release | cut -d'"' -f2)
OS_RELEASE=$(grep PRETTY_NAME /etc/os-release | cut -d'"' -f2)
fi
echo "Quickemu ${VERSION} using ${QEMU} v${QEMU_VER_LONG}"
echo " - Host: ${HOST_OS} running ${KERNEL_NAME} ${KERNEL_VER} ${KERNEL_NODE}"
echo " - Host: ${OS_RELEASE} running ${KERNEL_NAME} ${KERNEL_VER} ${KERNEL_NODE}"
# Force to lowercase.
boot=${boot,,}