Module: check_mk
Branch: master
Commit: 23072920c046f585fb14cec5839e36cf840b5962
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=23072920c046f5…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Fri Feb 22 09:17:33 2019 +0100
6761 FIX agent_ipmi_sensors: Fixed crash if ipmi driver or bmc key option is used
The special agent crashed if the mentioned options has been used because
a hidden behaviour in python prevented that these options are interpreted
correctly. This bug has been in place, since these options have been
introduced in werk #4108.
FEED-3426
Change-Id: Ie81106507c30d624ada612ebd15c35968818f176
---
.werks/6761 | 13 +++++++++++++
agents/special/agent_ipmi_sensors | 4 ++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/.werks/6761 b/.werks/6761
new file mode 100644
index 0000000..a0929cd
--- /dev/null
+++ b/.werks/6761
@@ -0,0 +1,13 @@
+Title: agent_ipmi_sensors: Fixed crash if ipmi driver or bmc key option is used
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1550823224
+Class: fix
+
+The special agent crashed if the mentioned options has been used because
+a hidden behaviour in python prevented that these options are interpreted
+correctly. This bug has been in place, since these options have been
+introduced.
diff --git a/agents/special/agent_ipmi_sensors b/agents/special/agent_ipmi_sensors
index b8a0c53..6860993 100755
--- a/agents/special/agent_ipmi_sensors
+++ b/agents/special/agent_ipmi_sensors
@@ -121,11 +121,11 @@ def agent_ipmi_sensors_main(cmdline_args):
# FreeIPMI options
elif o in ['-D']:
- additional_opts += ["%s %s" % (o, a)]
+ additional_opts += ["%s" % o, "%s" % a]
elif o in ['--driver-type']:
additional_opts += ["%s=%s" % (o, a)]
elif o in ['-k']:
- additional_opts += ["%s %s" % (o, a)]
+ additional_opts += ["%s" % o, "%s" % a]
elif o in ['--quiet-cache']:
additional_opts.append(o)
elif o in ['--sdr-cache-recreate']: