Fix fan detection on some BMC boards

This commit is contained in:
Daniel Berteaud 2023-06-29 09:29:15 +02:00
parent b0958e6fba
commit 3159f43ced
1 changed files with 2 additions and 2 deletions

View File

@ -152,9 +152,9 @@ if ($ipmitool && -x $ipmitool){
my $val = undef;
foreach my $d (@details){
chomp $d;
if ($d =~ m/^\s*Sensor\sReading\s*:\s*(\w+)/){
if ($d =~ m/^\s*Sensor\sReading\s*:\s*(\d+(\.\d+)?)/){
$val = $1;
if ($val !~ m/^\d+$/){
if ($val !~ m/^\d+(\.\d+)?$/){
print "Skipping sensor $name, couldn't parse its value: $val\n";
next SENSOR;
}