smt: Fix check to detect if a system is running virtually

/sys/hypervisor exists when a host has loaded the kvm modules.

Fixes: #12472
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2020-08-21 11:51:10 +02:00
parent 087e302381
commit 0e457b13ea
2 changed files with 6 additions and 1 deletions

View File

@@ -21,7 +21,7 @@ case "${1}" in
fi 2>/dev/null
# Do not disable SMT inside virtual machines
if [ -d "/sys/hypervisor" ]; then
if running_on_hypervisor; then
exit 0
fi