modules/enterprise/agent/src/etc/rhq-agent.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit 65fb0e66d977493d1c919c1c3cf3a2ea0a5889fc Author: John Mazzitelli mazz@redhat.com Date: Fri May 28 14:39:40 2010 -0400
fixing two problems with the way LD_LIB_PATH was set: 1) don't set and export on the same line - I've seen instances where you can't export and set together (can't remember if is was OS specific or shell specific, but either way, always export separately) 2) remember to append existing path but only if it exists (never end with an empty ":" because it will infer "." in the path)
diff --git a/modules/enterprise/agent/src/etc/rhq-agent.sh b/modules/enterprise/agent/src/etc/rhq-agent.sh index fc48d7a..a94a761 100755 --- a/modules/enterprise/agent/src/etc/rhq-agent.sh +++ b/modules/enterprise/agent/src/etc/rhq-agent.sh @@ -185,11 +185,17 @@ fi debug_msg "RHQ_AGENT_CMDLINE_OPTS: $RHQ_AGENT_CMDLINE_OPTS"
# ---------------------------------------------------------------------- -# Prepare LD_LIBRARY_PATH for apache +# Prepare LD_LIBRARY_PATH to include libraries shipped with the agent # ----------------------------------------------------------------------
if [ "x$_LINUX" != "x" ]; then -export LD_LIBRARY_PATH=${RHQ_AGENT_HOME}/lib + if [ "x$LD_LIBRARY_PATH" = "x" ]; then + LD_LIBRARY_PATH="${RHQ_AGENT_HOME}/lib" + else + LD_LIBRARY_PATH="${RHQ_AGENT_HOME}/lib:${LD_LIBRARY_PATH}" + fi + export LD_LIBRARY_PATH + debug_msg "LD_LIBRARY_PATH: $LD_LIBRARY_PATH" fi
# ----------------------------------------------------------------------
rhq-commits@lists.fedorahosted.org