(Downstream Fedora patch) Fix for issue #244
@@ -16,6 +16,7 @@ x.x.x xxxx-xx-xx
check_users: segmentation fault if both thresholds are not provided
check_dns: DNS CRITICAL - expected ‘{hostname}.’ but got 'name = {hostname}.'
check_mailq: Nullmailer Regex is not working for Ubuntu 16.04
+ check_swap: Downstream Fedora patch: Prevent check_swap from returning OK, if no swap activated
2.2.0 2017-01-19
@@ -126,7 +126,7 @@ main (int argc, char **argv)
free_swap_mb += dskfree_mb;
if (allswaps) {
if (dsktotal_mb == 0)
- percent=100.0;
+ percent=0.0;
else
percent = 100 * (((double) dskused_mb) / ((double) dsktotal_mb));
result = max_state (result, check_swap (percent, dskfree_mb));