From cb053399a6fcba3a018e994e5cc8c62ee19f61c0 Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 24 Mar 2025 13:16:24 +0100 Subject: [PATCH] Update boot.sh --- src/boot.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/boot.sh b/src/boot.sh index 57fdfe3..b154013 100644 --- a/src/boot.sh +++ b/src/boot.sh @@ -75,20 +75,22 @@ esac MSRS="/sys/module/kvm/parameters/ignore_msrs" if [ -e "$MSRS" ]; then result=$(<"$MSRS") + result="${result//[![:print:]]/}" if [[ "$result" == "0" ]] || [[ "${result^^}" == "N" ]]; then echo 1 | tee "$MSRS" > /dev/null 2>&1 || true fi fi CLOCKSOURCE="tsc" -[[ "${ARCH,,}" == "arm64" ]] && CLOCKSOURCE="arch_sys_counter" +[[ "${ARCH,,}" == "arm64" ]] && CLOCKSOURCE="arch_sys_counter" CLOCK="/sys/devices/system/clocksource/clocksource0/current_clocksource" if [ ! -f "$CLOCK" ]; then warn "file \"$CLOCK\" cannot not found?" else result=$(<"$CLOCK") - case "${result//[^[:alpha:]_- ]/}" in + result="${result//[![:print:]]/}" + case "${result,,}" in "${CLOCKSOURCE,,}" ) ;; "kvm-clock" ) info "Nested KVM virtualization detected.." ;; "hyperv_clocksource_tsc_page" ) info "Nested Hyper-V virtualization detected.." ;;