Module: check_mk
Branch: master
Commit: 59fece037bc7f8dfdafc4a11df2f1d8e24e36ab1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=59fece037bc7f8…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Feb 23 13:31:26 2017 +0100
4487 check_mk_agent.aix, check_mk_agent.linux, check_mk_agent.solaris: Agents use either
default MK_[LIB/CONF/VAR]DIR variables or environmental variables if configured
Change-Id: I12ece11a3f2fc532a9439031addfbf2171c3971a
---
.werks/4487 | 25 +++++++++++++++++++++++++
agents/check_mk_agent.aix | 6 +++---
agents/check_mk_agent.linux | 6 +++---
agents/check_mk_agent.solaris | 6 +++---
4 files changed, 34 insertions(+), 9 deletions(-)
diff --git a/.werks/4487 b/.werks/4487
new file mode 100644
index 0000000..d8dd4d0
--- /dev/null
+++ b/.werks/4487
@@ -0,0 +1,25 @@
+Title: check_mk_agent.aix, check_mk_agent.linux, check_mk_agent.solaris: Agents use
either default MK_[LIB/CONF/VAR]DIR variables or environmental variables if configured
+Level: 1
+Component: checks
+Class: feature
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1488966063
+
+
+On AIX the default variables are
+MK_LIBDIR /usr/check_mk/lib
+MK_CONFDIR /usr/check_mk/conf
+MK_VARDIR /tmp/check_mk
+
+On Linux the default variables are
+MK_LIBDIR /usr/lib/check_mk_agent
+MK_CONFDIR /etc/check_mk
+MK_VARDIR /var/lib/check_mk_agent
+
+On Solaris the default variables are
+MK_LIBDIR /usr/lib/check_mk_agent"
+MK_CONFDIR /etc/check_mk"
+MK_VARDIR /var/lib/check_mk_agent"
diff --git a/agents/check_mk_agent.aix b/agents/check_mk_agent.aix
index f258768..7df2f73 100755
--- a/agents/check_mk_agent.aix
+++ b/agents/check_mk_agent.aix
@@ -34,9 +34,9 @@ fi
export LC_ALL=C
unset LANG
-export MK_LIBDIR="/usr/check_mk/lib"
-export MK_CONFDIR="/usr/check_mk/conf"
-export MK_VARDIR="/tmp/check_mk"
+export MK_LIBDIR=${MK_LIBDIR-/usr/check_mk/lib}
+export MK_CONFDIR=${MK_CONFDIR-/usr/check_mk/conf}
+export MK_VARDIR=${MK_VARDIR-/tmp/check_mk}
# All executables in PLUGINSDIR will simply be executed and their
# ouput appended to the output of the agent. Plugins define their own
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 5abe471..5b2a580 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -28,9 +28,9 @@
export LC_ALL=C
unset LANG
-export MK_LIBDIR="/usr/lib/check_mk_agent"
-export MK_CONFDIR="/etc/check_mk"
-export MK_VARDIR="/var/lib/check_mk_agent"
+export MK_LIBDIR=${MK_LIBDIR:-/usr/lib/check_mk_agent}
+export MK_CONFDIR=${MK_CONFDIR:-/etc/check_mk}
+export MK_VARDIR=${MK_VARDIR:-/var/lib/check_mk_agent}
# Provide information about the remote host. That helps when data
# is being sent only once to each remote host.
diff --git a/agents/check_mk_agent.solaris b/agents/check_mk_agent.solaris
index 20e46a1..dc4ec58 100755
--- a/agents/check_mk_agent.solaris
+++ b/agents/check_mk_agent.solaris
@@ -28,9 +28,9 @@
export LC_ALL=C
unset LANG
-export MK_LIBDIR="/usr/lib/check_mk_agent"
-export MK_CONFDIR="/etc/check_mk"
-export MK_VARDIR="/var/lib/check_mk_agent"
+export MK_LIBDIR=${MK_LIBDIR:-/usr/lib/check_mk_agent}
+export MK_CONFDIR=${MK_CONFDIR:-/etc/check_mk}
+export MK_VARDIR=${MK_VARDIR:-/var/lib/check_mk_agent}
# All executables in PLUGINSDIR will simply be executed and their
# ouput appended to the output of the agent. Plugins define their own