Skip to content

check_ram2: fix accidental string comparison for thresholds

Adrian Schollmeyer requested to merge 7-fix-int-comparison into master

Apparently we did string comparisons (at least under some circumstances) in the threshold checks. As it turns out, some of the outputs fed to bash's comparison also had decimal places, which bash doesn't support for numerical comparison. This commit switches to (( and )) to enforce numerical comparisons and strips away any decimal places in the strings passed on to the numerical comparison operator, thus forcing the input to the comparison to be an integer.

Closes: #7 (closed)

@netali bitte mal prüfen, ob das das Problem löst.

Merge request reports