blob: 86e1f138eed1779583fde8976358b03215100b40 [file] [log] [blame]
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"