From 18cdda254b6d6d18458da618e07f2e601d3ecf67 Mon Sep 17 00:00:00 2001 From: Gitsarry <131813959+Gitsarry@users.noreply.github.com> Date: Tue, 13 Aug 2024 09:03:01 +0200 Subject: [PATCH] fix: make function ignore_msrs_always work With the previous version the file was never written if it not existed before, logic bug. --- quickemu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickemu b/quickemu index 947fa32..d1a569c 100755 --- a/quickemu +++ b/quickemu @@ -10,7 +10,7 @@ function ignore_msrs_always() { # Make sure the host has /etc/modprobe.d if [ -d /etc/modprobe.d ]; then # Skip if ignore_msrs is already enabled, assumes initramfs has been rebuilt - if grep -lq 'ignore_msrs=Y' /etc/modprobe.d/kvm-quickemu.conf >/dev/null 2>&1; then + if ! grep -lq 'ignore_msrs=Y' /etc/modprobe.d/kvm-quickemu.conf >/dev/null 2>&1; then echo "options kvm ignore_msrs=Y" | sudo tee /etc/modprobe.d/kvm-quickemu.conf sudo update-initramfs -k all -u fi