-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Rainer,
On 7/12/2010 9:14 AM, Rainer Frey wrote: > 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? I think I understand the source of the confusion, here: 1. you want CATALINA_BASE to be set before CATALINA_HOME/bin/setenv.sh is invoked 2. CATALINA_BASE must be set to something other than CATALINA_BASE in order for CATALINA_BASE/bin/setenv.sh to be invoked /at all/ 3. case here is that CATALINA_HOME/bin/setenv.sh is being used, but you want to use CATALINA_BASE/[something] in your generic scripts Okay, let's start from #2: if a user is going to use CATALINA_BASE, it must be set before any scripts are called, otherwise CATALINA_BASE doesn't get used at all (and CATALINA_HOME is the appropriate location of whatever configuration files you want to use). There will be cases where CATALINA_BASE is not set at all, and therefore essentially defaults to CATALINA_HOME. It is in this case that blindly using CATALINA_BASE in your CATALINA_HOME/bin/setenv.sh script is inappropriate. Okay, then don't use it blindly. How about something like this in your setenv.sh: if [ -n "${CATALINA_BASE}" ] ; then THE_BASE_DIR="${CATALINA_BASE}" else THE_BASE_DIR="${CATALINA_HOME}" fi source "${THE_BASE_DIR}/some_setup_script.sh" ... > 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. CONF_DIR="${THE_BASE_DIR}/conf" > 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? It's probably a good thing for setenv.sh to be able to determine whether CATALINA_BASE is explicitly set, though I suppose if CATALINA_BASE == CATALINA_HOME, then there's no distinct CATALINA_BASE. I'm not sure a patch is necessary, since the script has all the information it needs. Perhaps your script will have to be a bit more verbose (for instance, by explicitly testing for CATALINA_BASE), but it is certainly not prohibited from doing it's own work. Does your setenv.sh script expect to use a default file (CATALINA_HOME/conf/whatever.jmx) and allow it to be overridden in CATALINA_BASE/conf/whatever.jmx? If so, then your script will have to test both locations, anyway, because you'll have to check to see if the (optional) override file exists in CATALINA_BASE and then check for it again under CATALINA_HOME. Having a blank CATALINA_BASE seems to be helpful in this situation. Is there a situation that you think doesn't work given the current script behavior? - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkw/UsYACgkQ9CaO5/Lv0PABlQCfS2x+KmEIpSlSstbKLLILgEjO ilgAn12X2xi5YhEj8EHwQKWI+uh9TOFg =0INM -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org