On Monday 12 July 2010 14:44:19 Konstantin Kolinko wrote: > 2010/7/12 Rainer Frey <rainer.f...@inxmail.de>: > > Hi, > > > > in the default case (just one instance, supplied start scripts), > > CATALINA_BASE is set to CATALINA_HOME. But this assignment, > > > > if [ -z "$CATALINA_BASE" ] ; then > > CATALINA_BASE="$CATALINA_HOME" > > fi > > > > is done *after* reading setenv.sh. Is this for a specific reason, or just > > accidently? > > I think that in the following lines of > http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/bin/catalina.sh?view=mark > up > > 120 if [ -r "$CATALINA_BASE"/bin/setenv.sh ]; then > 121 . "$CATALINA_BASE"/bin/setenv.sh > 122 elif [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then > 123 . "$CATALINA_HOME"/bin/setenv.sh > 124 fi > > the line 120 should be something like > if [ -n "$CATALINA_BASE" ] && [ -r "$CATALINA_BASE"/bin/setenv.sh ]; then > > (that is already fixed in trunk in a different way). > > > In any case, if CATALINA_BASE is not set, > $CATALINA_BASE/bin/setenv.sh cannot be read (chicken vs. egg), and in > that case $CATALINA_HOME/bin/setenv.sh is read. > > That is nearly the same result as if there was assignment > CATALINA_BASE="$CATALINA_HOME" before.
I understand that, but would it be possible/good/not causing problems to change this to do CATALINA_BASE="$CATALINA_HOME first, so a setenv.sh can rely on CATALINA_BASE being set? > So, what is your problem? > You must set CATALINA_BASE before calling the standard scripts, if you > need this feature of distinct CATALINA_HOME vs. CATALINA_BASE. This > feature is not enabled by default. I want to know the path to the conf directory in setenv.sh, and I prefer to do that in a manner that does not depend on whether this setenv.sh is used in a standard installation with CATALINA_BASE=$CATALINA_HOME or in a multi- instance setup with distinct CATALINA_BASE and CATALINA_HOME. If catalina.sh would do CATALINA_BASE=$CATALINA_HOME before sourcing setenv.sh, I could always use $CATALINA_BASE/conf in setenv.sh, and would not need to take care of this distinction again. So my question essentially is: would you be interested in a patch that changes catalina.sh, or is there a good reason to leave it as is, and let everybody sort this out themselves in their setenv.sh? > Best regards, > Konstantin Kolinko Rainer --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org