summaryrefslogtreecommitdiff
blob: 86e1f138eed1779583fde8976358b03215100b40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
https://bugs.gentoo.org/show_bug.cgi?id=352213
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=598549

Patch by Jari Aalto <jari.aalto@cante.net>
--- a/rgmanager/src/resources/SAPDatabase
+++ b/rgmanager/src/resources/SAPDatabase
@@ -670,8 +670,11 @@
 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
+if [ "$DIR_EXECUTABLE" ]; then
+  if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then
+      LD_LIBRARY_PATH="$DIR_EXECUTABLE${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
+      export LD_LIBRARY_PATH
+  fi
 fi
 sidadm="`echo $SID | tr [:upper:] [:lower:]`adm"
 
--- a/rgmanager/src/resources/SAPInstance
+++ b/rgmanager/src/resources/SAPInstance
@@ -382,8 +382,11 @@
 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
+if [ "$DIR_EXECUTABLE" ]; then
+  if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then
+    LD_LIBRARY_PATH="$DIR_EXECUTABLE${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
+    export LD_LIBRARY_PATH
+  fi
 fi
 sidadm="`echo $SID | tr [:upper:] [:lower:]`adm"