Module: check_mk
Branch: master
Commit: ec87a5638f626d41562eb9d9445959ca064304af
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ec87a5638f626d…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Mar 13 11:10:31 2017 +0100
4516 FIX check_mk_agent.linux: Escaped quotes in run_cached function used for ipmi-sensors
command
Change-Id: I15ad587e8a8f68a4ed26c3d90f683391a5b04958
---
.werks/4516 | 11 +++++++++++
agents/check_mk_agent.linux | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/4516 b/.werks/4516
new file mode 100644
index 0000000..07ce79c
--- /dev/null
+++ b/.werks/4516
@@ -0,0 +1,11 @@
+Title: check_mk_agent.linux: Escaped quotes in run_cached function used for ipmi-sensors
command
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1489399702
+
+
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 5b5c748..cecb049 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -444,7 +444,7 @@ then
# At least with ipmi-sensors 0.7.16 this group is Power_Unit instead of "Power
Unit"
run_cached -s ipmi_sensors 300 "for class in Temperature Power_Unit Fan
do
- ipmi-sensors $IPMI_FORMAT --sdr-cache-directory /var/cache $IPMI_GROUP_OPT
"$class" | sed -e 's/ /_/g' -e 's/:_\?/ /g' -e 's@
\([^(]*\)_(\([^)]*\))@ \2_\1@'
+ ipmi-sensors $IPMI_FORMAT --sdr-cache-directory /var/cache $IPMI_GROUP_OPT
\"$class\" | sed -e 's/ /_/g' -e 's/:_\?/ /g' -e 's@
\([^(]*\)_(\([^)]*\))@ \2_\1@'
# In case of a timeout immediately leave loop.
if [ $? = 255 ] ; then break ; fi
done"