lm_sensors/lm_sensors-wrapper
konglidong eaa7b5256e backport upstraem patch to fix no sensors failure in vm
(cherry picked from commit 27ee6e7a77f7c18abe4b4f3c426a51240f5cba72)
2023-11-09 16:52:02 +08:00

9 lines
159 B
Bash

#!/bin/sh
if /usr/bin/systemd-detect-virt 2>/dev/null 1>&2; then
SENSORS_FLAGS_VM='-n';
else
SENSORS_FLAGS_VM='';
fi;
/usr/bin/sensors -s $SENSORS_FLAGS_VM