Fallback to /etc/os-release if lsb_release is not available

This commit is contained in:
Martin Wimpress 2021-10-25 10:01:37 +01:00 committed by Martin Wimpress
parent 23e3da40e3
commit db855be6ed
No known key found for this signature in database
GPG key ID: 61DF940515E06DA3

View file

@ -211,7 +211,7 @@ function vm_boot() {
local KERNEL_NAME="Unknown"
local KERNEL_NODE=""
local KERNEL_VER="?"
local LSB_DESCRIPTION=""
local LSB_DESCRIPTION="Unknown OS"
local MAC_BOOTLOADER=""
local MAC_MISSING=""
local MAC_DISK_DEV="ide-hd,bus=ahci.2"
@ -229,6 +229,8 @@ function vm_boot() {
if command -v lsb_release &>/dev/null; then
LSB_DESCRIPTION=$(lsb_release --description --short)
elif [ -e /etc/os-release ]; then
LSB_DESCRIPTION=$(grep PRETTY_NAME /etc/os-release | cut -d'"' -f2)
fi
echo "Quickemu ${VERSION} using ${QEMU} v${QEMU_VER_LONG}"