Module: check_mk
Branch: master
Commit: baee88ed4840126e8c360e4a306ac8783f08a73a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=baee88ed484012…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jul 8 12:11:39 2014 +0200
check_mk_agent.linux: make run_cached available for plugins
---
agents/check_mk_agent.linux | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 2429205..afb5de4 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -65,6 +65,7 @@ fi
# Runs a command asynchronous by use of a cache file
function run_cached () {
+ local section=
if [ "$1" = -s ] ; then local section="echo
'<<<$2>>>' ; " ; shift ; fi
local NAME=$1
local MAXAGE=$2
@@ -99,6 +100,9 @@ function run_cached () {
fi
}
+# Make run_cached available for subshells (plugins, local checks, etc.)
+export -f run_cached
+
echo '<<<check_mk>>>'
echo Version: 1.2.5i5
echo AgentOS: linux