tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Watler <>
Subject Linux/RPM 4.1.18 dtomcat4 script changes
Date Tue, 11 Feb 2003 01:32:08 GMT
Just wondering if anyone else is having problems with changes to the RPM
dtomcat4 script from 4.1.10 to 4.1.18?

We use several methods to launch Tomcat within development, including
those that expect to set the CATALINA_HOME environment variable and
launch using /usr/bin/dtomcat4. However, this new code
in dtomcat4 overwrites the setting, resulting CATALINA_HOME being set
relative to the dtomcat4 script itself:

# resolve links - $0 may be a softlink

while [ -h "$PRG" ]; do
  ls=`ls -ld "$PRG"`
  link=`expr "$ls" : '.*-> \(.*\)$'`
  if expr "$link" : '.*/.*' > /dev/null; then
    PRG=`dirname "$PRG"`/"$link"

# Get standard environment variables
PRGDIR=`dirname "$PRG"`
CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`
if [ -r "$CATALINA_HOME"/bin/ ]; then
  . "$CATALINA_HOME"/bin/

Since this script is located in "/usr/bin" and Tomcat is installed in
"/var/tomcat4" by the RPM, it would appear that this code can not find a
default correctly and should not have been added. I would expect that
the assignment of CATALINA_HOME to take place only if not already set,
as in:

if [ -z "$CATALINA_HOME" ] ; then
  CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`

Have I missed something here?

Randy Watler
Finali Corporation

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message