Add KVM check

This commit is contained in:
Stephan Raabe
2023-12-07 10:02:48 +01:00
parent eb8b08be0e
commit e5f603b69c
6 changed files with 33 additions and 3 deletions

View File

@@ -92,7 +92,6 @@ _installPackagesYay() {
yay --noconfirm -S "${toInstall[@]}";
}
# ------------------------------------------------------
# Create symbolic links
# ------------------------------------------------------
@@ -123,3 +122,15 @@ _installSymLink() {
fi
fi
}
# ------------------------------------------------------
# Installation in a KVM Virtual Machine
# ------------------------------------------------------
_isKVM() {
iskvm=$(sudo dmesg | grep "Hypervisor detected")
if [[ "$iskvm" =~ "KVM" ]] ;then
echo 0
else
echo 1
fi
}