If CATALINA_BASE is not defined we would try to read directly from /bin/setenv.sh...
authormturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 4 Mar 2010 07:27:32 +0000 (07:27 +0000)
committermturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 4 Mar 2010 07:27:32 +0000 (07:27 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@918883 13f79535-47bb-0310-9956-ffa450edef68

bin/catalina.sh

index 1baf7fc..a2eb4d8 100755 (executable)
@@ -111,10 +111,11 @@ PRGDIR=`dirname "$PRG"`
 # but allow them to be specified in setenv.sh, in rare case when it is needed.
 CLASSPATH=
 
-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
+SETENVPATH="${CATALINA_BASE:-$CATALINA_HOME}"
+if [ -r "$SETENVPATH/bin/setenv.sh" ]; then
+  . "$SETENVPATH/bin/setenv.sh"
+elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
+  . "$CATALINA_HOME/bin/setenv.sh"
 fi
 
 # For Cygwin, ensure paths are in UNIX format before anything is touched