Module: check_mk
Branch: master
Commit: 9ce2caab61801c6bea17ef2508bcae34e9b8edef
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9ce2caab61801c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jan 7 09:25:32 2014 +0100
FIX Fixed processing of cached agent plugins / local scripts
Werk #0345 introduced a bug which resulted in cached plugins / local scripts
were executed, the cache was storred, but never processed. This change
fixes the names of such cache files to make them being processed again.
---
.werks/426 | 12 ++++++++++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 2 +-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/426 b/.werks/426
new file mode 100644
index 0000000..6c42d39
--- /dev/null
+++ b/.werks/426
@@ -0,0 +1,12 @@
+Title: Fixed processing of cached agent plugins / local scripts
+Level: 2
+Component: core
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1389082939
+Targetversion: future
+
+Werk #0345 introduced a bug which resulted in cached plugins / local scripts
+were executed, the cache was storred, but never processed. This change
+fixes the names of such cache files to make them being processed again.
diff --git a/ChangeLog b/ChangeLog
index 13737e3..408da54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
* 0314 FIX: Fix CMC not executing any Check_MK checks after config reload...
* 0401 FIX: Fix rule precedence in WATO-configured manual checks...
* 0402 FIX: Fix exception in case of missing agent sections of cluster-aware
checks...
+ * 0426 FIX: Fixed processing of cached agent plugins / local scripts...
Checks & Agents:
* 0306 esx_vsphere_counters: added missing ramdisk levels sfcbtickets
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 7c24e92..1649568 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -88,7 +88,7 @@ function run_cached () {
# Cache file outdated and new job not yet running? Start it
if [ -z "$USE_CACHEFILE" -a ! -e "$CACHEFILE.new" ] ; then
- echo "set -o noclobber ; exec > $CACHEFILE.new || exit 1 ; $CMDLINE
&& mv $CACHEFILE.new $CACHEFILE || rm -f $CACHEFILE $CACHEFILE.new" | nohup
bash 2>/dev/null &
+ echo "set -o noclobber ; exec > \"$CACHEFILE.new\" || exit 1 ;
$CMDLINE && mv \"$CACHEFILE.new\" \"$CACHEFILE\" || rm -f
\"$CACHEFILE\" \"$CACHEFILE.new\"" | nohup bash 2>/dev/null
&
fi
}