summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-04-16 17:17:31 +0200
committerChristian Breunig <christian@breunig.cc>2026-04-16 17:17:31 +0200
commit4a5cb1db2b35f4300552717f75422376f381b3bd (patch)
tree93b289b6677ab8c705238132e44256d0b7c27539 /src
parent922d515dccc5df1e94119839e9b1e56f3e6f1074 (diff)
downloadvyos-1x-4a5cb1db2b35f4300552717f75422376f381b3bd.tar.gz
vyos-1x-4a5cb1db2b35f4300552717f75422376f381b3bd.zip
op-mode: T8483: remove hypervisor checks from sensors detection
Maintainers agreed to remove the CPU-flag-based hypervisor check, as it is arbitrary and can produce incorrect behavior. Sensors can be passed through to virtual machines, so running in a VM should not be treated differently. If no sensors are detected - whether on a hypervisor VM or on bare metal - the command now reports: "No sensors found".
Diffstat (limited to 'src')
-rwxr-xr-xsrc/op_mode/show_sensors.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/op_mode/show_sensors.py b/src/op_mode/show_sensors.py
index 54a0f52c9..b7ff05178 100755
--- a/src/op_mode/show_sensors.py
+++ b/src/op_mode/show_sensors.py
@@ -18,16 +18,9 @@
import re
import sys
-from vyos.utils.file import read_file
from vyos.utils.process import popen
from vyos.utils.process import DEVNULL
-cpu_info = read_file('/proc/cpuinfo')
-# Linux always adds "hypervisor" to CPU flags
-if 'hypervisor' in cpu_info:
- print('VyOS running under hypervisor, no sensors available!')
- sys.exit(1)
-
output, retcode = popen("sensors --no-adapter", stderr=DEVNULL)
if retcode == 0:
print (output)