Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main-src > by-pkgid > e536fc0c6270ec1d92a0fd41bb1f8360 > files > 111

rgmanager-2.0.52-28.el5_8.2.src.rpm

From 9be62ccbea876e67b8ad4bb3c1b4203feb4fc1f7 Mon Sep 17 00:00:00 2001
From: Lon Hohberger <lhh@redhat.com>
Date: Tue, 25 Jan 2011 12:10:25 -0500
Subject: [PATCH] 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@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"
 
-- 
1.7.3.4