Module: check_mk
Branch: master
Commit: 7517854e01f2448c9fceec2369f8c04b73d40235
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7517854e01f244…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Dec 8 16:26:56 2014 +0100
#1713 FIX check_fstab_mounts: now correctly ignores swap space
Thanks to Christian Thiemann
---
.werks/1713 | 10 ++++++++++
ChangeLog | 1 +
doc/treasures/localchecks/check_fstab_mounts | 5 +++--
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/1713 b/.werks/1713
new file mode 100644
index 0000000..31ee440
--- /dev/null
+++ b/.werks/1713
@@ -0,0 +1,10 @@
+Title: check_fstab_mounts: now correctly ignores swap space
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1418052383
+Class: fix
+
+Thanks to Christian Thiemann
+
diff --git a/ChangeLog b/ChangeLog
index ed0f1a8..e6651da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -129,6 +129,7 @@
* 1710 FIX: omd_status: Fix totally missing section in Linux agent...
* 1711 FIX: win_printers.ps1: ignore temporary printers created by RDP terminal
sessions...
* 1712 FIX: hyper_vms: fixed for snapshot VMs with (...) in their names...
+ * 1713 FIX: check_fstab_mounts: now correctly ignores swap space...
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
diff --git a/doc/treasures/localchecks/check_fstab_mounts
b/doc/treasures/localchecks/check_fstab_mounts
index 40b4e0a..ed17208 100755
--- a/doc/treasures/localchecks/check_fstab_mounts
+++ b/doc/treasures/localchecks/check_fstab_mounts
@@ -21,9 +21,10 @@ for line in file("/etc/fstab"):
device, mountpoint, fstype, options, rest = line.split(None, 4)
options = options.split(",")
- if "noauto" not in options and mountpoint not in mounted:
+ expected = "noauto" not in options and fstype != "swap"
+ if expected and mountpoint not in mounted:
missing.append("%s is not mounted on %s" % (device, mountpoint))
- else:
+ elif expected:
count += 1
if missing: