[checkmk-commits] Check_MK Git: check_mk: #2234 FIX AIX Agent: Forced load of environment and fixed call of trd (Libelle Business Shadow )

Sven Rueß sr at mathias-kettner.de
Mon Apr 27 12:06:48 CEST 2015


Module: check_mk
Branch: master
Commit: 3e6dbd3fab60b9719a161903ce444da8406a4eda
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3e6dbd3fab60b9719a161903ce444da8406a4eda

Author: Sven Rueß <sr at mathias-kettner.de>
Date:   Mon Apr 27 12:06:20 2015 +0200

#2234 FIX AIX Agent: Forced load of environment and fixed call of trd (Libelle Business Shadow)

Environment was not loaded if the agent was called from xinetd/remote. The environment
is loaded every time if the agent is called.

Libelle Business Shadow cannot be called without an absolute path. Now it is called
with an absolute path.

---

 .werks/2234               |   13 +++++++++++++
 ChangeLog                 |    1 +
 agents/check_mk_agent.aix |   13 ++++++++-----
 3 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/.werks/2234 b/.werks/2234
new file mode 100644
index 0000000..d23fa83
--- /dev/null
+++ b/.werks/2234
@@ -0,0 +1,13 @@
+Title: AIX Agent: Forced load of environment and fixed call of trd (Libelle Business Shadow)
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1430128713
+Class: fix
+
+Environment was not loaded if the agent was called from xinetd/remote. The environment
+is loaded every time if the agent is called.
+
+Libelle Business Shadow cannot be called without an absolute path. Now it is called
+with an absolute path.
diff --git a/ChangeLog b/ChangeLog
index 70112e3..95d2820 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -344,6 +344,7 @@
     * 2070 FIX: agent_netapp: fixed exception when a channel has no shelf-list configured
     * 2212 FIX: oracle_tablespaces: Fix plugin output in case of detected problem in Autoextend settings...
     * 1243 FIX: mk_postgres: Prevent loading of .psqlrc...
+    * 2234 FIX: AIX Agent: Forced load of environment and fixed call of trd (Libelle Business Shadow)...
 
     Multisite:
     * 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/agents/check_mk_agent.aix b/agents/check_mk_agent.aix
index 0edfa08..c8394b3 100755
--- a/agents/check_mk_agent.aix
+++ b/agents/check_mk_agent.aix
@@ -23,6 +23,12 @@
 # to the Free Software Foundation, Inc., 51 Franklin St,  Fifth Floor,
 # Boston, MA 02110-1301 USA.
 
+# force load of environment
+if [ -e $HOME/.profile ]
+then
+    . $HOME/.profile
+fi
+
 # Remove locale settings to eliminate localized outputs where possible
 export LC_ALL=C
 unset LANG
@@ -55,7 +61,7 @@ fi
 # Shell version of the waitmax utility, that limits the runtime of
 # commands. This version does not conserve the original exit code
 # of the command. It is successfull if the command terminated
-    # in time.
+# in time.
 function waitmax
 {
    TIMEOUT=${1}0
@@ -206,7 +212,7 @@ netstat -ntfinet | awk ' /^tcp/ { c[$6]++; } END { for (x in c) { print x, c[x];
 if type trd >/dev/null 2>&1
 then
   echo '<<<libelle_business_shadow:sep(58)>>>'
-  trd -s
+  $(which trd) -s
 fi
 
 
@@ -258,6 +264,3 @@ then
         echo "(${PLUGIN##*/}) $descr $? $OUTPUT"
     done
 fi
-
-
-



More information about the checkmk-commits mailing list