Fix bug 43594. Use setenv from CATALINA_BASE (if set) in preference to the one in...
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 1 Dec 2007 19:48:16 +0000 (19:48 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 1 Dec 2007 19:48:16 +0000 (19:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@600185 13f79535-47bb-0310-9956-ffa450edef68

RUNNING.txt
bin/catalina.bat
bin/catalina.sh

index b9488cd..770de6b 100644 (file)
@@ -106,6 +106,8 @@ When you use this "-Dcatalina.base=$CATALINA_BASE" argument, Tomcat will
 calculate all relative references for files in the following directories based
 on the value of $CATALINA_BASE instead of $CATALINA_HOME:
 
+* bin  - Only setenv.sh (*nix) and setenv.bat (windows)
+
 * conf - Server configuration files (including server.xml)
 
 * logs - Log and output files
index deea008..70673a2 100644 (file)
@@ -83,7 +83,12 @@ goto end
 :okHome
 
 rem Get standard environment variables
+if "%CATALINA_BASE%" == "" goto gotSetenvHome
+if exist "%CATALINA_BASE%\bin\setenv.bat" call "%CATALINA_BASE%\bin\setenv.bat"
+goto gotSetenvBase
+:gotSetenvHome
 if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"
+:gotSetenvBase
 
 rem Get standard Java environment variables
 if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath
index c08a05e..8bb4f08 100755 (executable)
@@ -99,7 +99,9 @@ PRGDIR=`dirname "$PRG"`
 # Only set CATALINA_HOME if not already set
 [ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`
 
-if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
+if [ -r "$CATALINA_BASE"/bin/setenv.sh ]; then
+  . "$CATALINA_BASE"/bin/setenv.sh
+elif [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
   . "$CATALINA_HOME"/bin/setenv.sh
 fi