The value of defaultCutoff is never used (it should be).
The diskcheck.conf still has the perl syntax in the examples of setting
the cutoff values.
Lots of redundancies:
- For some reason the code calls "df" and "df -h" while the "df -h"
already has all the necessary information.
- In the
if (test or ...): ... elseif (test or ...): ...
construction the second "test or" is unneeded.
- tempfile is defined and never used.
Also, "-x none" should be added to exclude in diskcheck.conf to exclude "bind"
mounts and "-x tmpfs" to exclude the /dev/shm mount.
And finally, the pct is never converted from a string to a number, so all
comparisons return random results!
Created attachment 34021 [details]
A patch that fixes all these problems with the script (but not the conf file).
*** Bug 54795 has been marked as a duplicate of this bug. ***
fixed in an upcoming errata.
*** Bug 57224 has been marked as a duplicate of this bug. ***