cluster: RHEL57 - resource-agents: Improve LD_LIBRARY_PATH handling by SAP*

Lon Hohberger lon at fedoraproject.org
Mon Jun 13 16:45:13 UTC 2011


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=9be62ccbea876e67b8ad4bb3c1b4203feb4fc1f7
Commit:        9be62ccbea876e67b8ad4bb3c1b4203feb4fc1f7
Parent:        36a3625f67fd9a223d5e2db5e3ef3f02d37ee772
Author:        Lon Hohberger <lhh at redhat.com>
AuthorDate:    Tue Jan 25 12:10:25 2011 -0500
Committer:     Lon Hohberger <lhh at redhat.com>
CommitterDate: Mon Jun 13 12:40:01 2011 -0400

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

Resolves: rhbz#710637

Signed-off-by: Lon Hohberger <lhh at 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 5027018..3be8c8e 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 e70e2a3..fc0cb9e 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"
 


More information about the cluster-commits mailing list