fix: Modify suggested fix to use similar checks to existing ones in quickemu
Removes (dumb human written) redundandant check in favour of other (intelligent, still human written but noticed by ai) checks instead. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
4360977c78
commit
e649f69d1b
23
quickemu
23
quickemu
|
|
@ -13,23 +13,14 @@ function ignore_msrs_always() {
|
|||
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
|
||||
|
||||
# Code to verify if user has update-initramfs(debian exclusive? absent on arch ?) or mkinitcpio(present on arch) utility present
|
||||
|
||||
flag=0;
|
||||
man update-initramfs &>2
|
||||
a="$(echo $?)"
|
||||
# echo $a
|
||||
if [[ $a -eq 0 ]]; then
|
||||
flag=1;
|
||||
# Rebuild initramfs so the new kvm option takes effect
|
||||
flag=0
|
||||
if command -v update-initramfs &>/dev/null; then
|
||||
flag=1
|
||||
elif command -v mkinitcpio &>/dev/null; then
|
||||
flag=2
|
||||
else
|
||||
man mkinitcpio &>2
|
||||
a="$(echo $?)"
|
||||
# echo $a
|
||||
if [[ "$a" -eq 0 ]]; then
|
||||
flag=2;
|
||||
else
|
||||
flag=3;
|
||||
fi
|
||||
flag=3
|
||||
fi
|
||||
|
||||
# echo $flag;
|
||||
|
|
|
|||
Loading…
Reference in New Issue