Module: check_mk
Branch: master
Commit: eb12e0fb1ea0808c16b5e9c90cab5b96994f8597
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=eb12e0fb1ea080…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Thu Aug 6 14:22:15 2015 +0200
#2454 FIX lnx_distro: Fixed inventory for SuSE installations with patchlevel 0
---
.werks/2454 | 10 ++++++++++
ChangeLog | 1 +
inventory/lnx_distro | 5 ++++-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/2454 b/.werks/2454
new file mode 100644
index 0000000..e17d8b5
--- /dev/null
+++ b/.werks/2454
@@ -0,0 +1,10 @@
+Title: lnx_distro: Fixed inventory for SuSE installations with patchlevel 0
+Level: 1
+Component: inv
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1438863691
+
+
diff --git a/ChangeLog b/ChangeLog
index 4fb896e..af9704c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -180,6 +180,7 @@
* 2128 mk_inventory.vbs: inventory plugin for Windows now available as vbs script...
* 2367 FIX: win_system: Fixed exception when non-UTF-8 sequences are contained agent
output
* 2483 FIX: win_exefiles: more gracefully handle incomplete lines, avoid execption
+ * 2454 FIX: lnx_distro: Fixed inventory for SuSE installations with patchlevel 0
1.2.7i2:
diff --git a/inventory/lnx_distro b/inventory/lnx_distro
index e93c490..01bed9d 100644
--- a/inventory/lnx_distro
+++ b/inventory/lnx_distro
@@ -53,7 +53,10 @@ def inv_lnx_distro(info):
def inv_lnx_parse_suse_release(node, line):
node["type"] = "linux"
node["vendor"] = "SuSE"
- version = "%s.%s" % (line[1].split()[-1], line[2].split()[-1])
+ if len(line) == 3:
+ version = "%s.%s" % (line[1].split()[-1], line[2].split()[-1])
+ else:
+ version = "%s.0" % line[1].split()[-1]
node["version"] = version
if version == "11.2":
node["code_name"] = "Emerald"