aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-11-24 13:53:15 +0100
committerGravatar Christian Hesse <mail@eworm.de>2020-11-24 13:54:36 +0100
commit0545fbd8995551650caf54686165fb050a3d1ea8 (patch)
tree2f96795423e3fb6ebaf37f49f40bf962f8774e3f
parentaf50ed590923af80ad4e996a199a13dd1ca90e5e (diff)
check-health: re-measure until we have a valid value
-rw-r--r--check-health8
1 files changed, 4 insertions, 4 deletions
diff --git a/check-health b/check-health
index bb75fa0..bc7e064 100644
--- a/check-health
+++ b/check-health
@@ -70,10 +70,10 @@
$LogPrintExit info ("No threshold given for " . $Name . ", assuming 50C.") false;
:set ($CheckHealthTemperature->$Name) 50;
}
- :if ($Temperature != [ / system health get $Name ]) do={
- $LogPrintExit debug ("The second measurement for " . $Name . " differs, ignoring.") false;
- :set Temperature ($CheckHealthLast->$Name);
- :set ($CheckHealthCurrent->$Name) $Temperature;
+ :local Validate [ / system health get $Name ];
+ :while ($Temperature != $Validate) do={
+ :set Temperature $Validate;
+ :set Validate [ / system health get $Name ];
}
:if ($Temperature > $CheckHealthTemperature->$Name && \
$CheckHealthTemperatureNotified->$Name != true) do={