Module: check_mk
Branch: master
Commit: d9d0294c38fe1f06879446499502540c8f9df81e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d9d0294c38fe1f…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Feb 5 11:18:42 2018 +0100
5758 FIX lnx_distro: Fixed 'Inventory failed' while parsing os-release output of
RHEL 7.4 distros
Change-Id: Ie752e364ebaf53cf440660269b6093d3c7e5d06c
---
.werks/5758 | 10 ++++++++++
inventory/lnx_distro | 2 ++
2 files changed, 12 insertions(+)
diff --git a/.werks/5758 b/.werks/5758
new file mode 100644
index 0000000..9fe3951
--- /dev/null
+++ b/.werks/5758
@@ -0,0 +1,10 @@
+Title: lnx_distro: Fixed 'Inventory failed' while parsing os-release output of
RHEL 7.4 distros
+Level: 1
+Component: inv
+Compatible: compat
+Edition: cre
+Version: 1.5.0i3
+Date: 1517825837
+Class: fix
+
+
diff --git a/inventory/lnx_distro b/inventory/lnx_distro
index 4bbfccf..f244d26 100644
--- a/inventory/lnx_distro
+++ b/inventory/lnx_distro
@@ -75,6 +75,8 @@ def inv_lnx_distro(info):
def inv_lnx_parse_os(node, line):
for entry in line:
+ if entry.count("=") == 0:
+ continue
k, v = map(lambda x: x.replace('"', ''),
entry.split("=", 1))
if k == "VERSION_ID":
node["version"] = v