lm_sensors/lm_sensors-wrapper
konglidong a20bf01a50 backport upstraem patch to fix no sensors failure in vm
(cherry picked from commit ceeca6e8745d966312502709ee487971ea5baf52)
2023-11-09 16:51:17 +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