Gitweb:
http://git.fedorahosted.org/git/resource-agents.git?p=resource-agents.git...
Commit: 394c23c8f9e1e0fb934ba994e2e5a786467d6bec
Parent: 94785737630d925368fd98639709b1e8518cf872
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Tue Jan 25 12:10:25 2011 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Jan 25 12:10:25 2011 -0500
resource-agents: Improve LD_LIBRARY_PATH handling by SAP*
This is a backport from the Heartbeat resource agents repository.
Author: Dejan Muhamedagic (dejan at hello-penguin com)
http://hg.linux-ha.org/agents/rev/2773e5850003
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/resources/SAPDatabase | 3 ++-
rgmanager/src/resources/SAPInstance | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/rgmanager/src/resources/SAPDatabase b/rgmanager/src/resources/SAPDatabase
index e1249b8..e03e8b6 100644
--- a/rgmanager/src/resources/SAPDatabase
+++ b/rgmanager/src/resources/SAPDatabase
@@ -993,7 +993,8 @@ fi
# as root user we need the library path to the SAP kernel to be able to call executables
if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then
- LD_LIBRARY_PATH=$DIR_EXECUTABLE:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
+ LD_LIBRARY_PATH=$DIR_EXECUTABLE${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
+ export LD_LIBRARY_PATH
fi
sidadm="`echo $SID | tr [:upper:] [:lower:]`adm"
diff --git a/rgmanager/src/resources/SAPInstance b/rgmanager/src/resources/SAPInstance
index a97aaf6..7d05b3a 100644
--- a/rgmanager/src/resources/SAPInstance
+++ b/rgmanager/src/resources/SAPInstance
@@ -566,7 +566,8 @@ fi
# as root user we need the library path to the SAP kernel to be able to call sapcontrol
if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then
- LD_LIBRARY_PATH=$DIR_EXECUTABLE:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
+ LD_LIBRARY_PATH=$DIR_EXECUTABLE${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
+ export LD_LIBRARY_PATH
fi
sidadm="`echo $SID | tr [:upper:] [:lower:]`adm"