tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r558525 - in /tomcat/container/branches/tc5.0.x: catalina/src/bin/catalina.50.bat catalina/src/bin/catalina.50.sh catalina/src/bin/catalina.bat catalina/src/bin/catalina.sh webapps/docs/changelog.xml
Date Sun, 22 Jul 2007 18:38:01 GMT
Author: rjung
Date: Sun Jul 22 11:37:58 2007
New Revision: 558525

URL: http://svn.apache.org/viewvc?view=rev&rev=558525
Log:
Backport r454193 (BZ 36976): Don't use CATALINA_OPTS when stopping.
Backport r385888 (BZ 38761): Handle relative symlinks.
Backport r393867 (BZ 38194): Error message for -force with empty CATALINA_PID.
Backport r394120 (BZ 37848): Only echo if we have a TTY.

Modified:
    tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.bat
    tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.sh
    tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.bat
    tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.sh
    tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml

Modified: tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.bat
URL: http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.bat?view=diff&rev=558525&r1=558524&r2=558525
==============================================================================
--- tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.bat (original)
+++ tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.bat Sun Jul 22 11:37:58
2007
@@ -12,7 +12,7 @@
 rem                   the same directory that CATALINA_HOME points to.
 rem
 rem   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
-rem                   "stop", or "run" command is executed.
+rem                   or "run" command is executed.
 rem
 rem   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
 rem                   the JVM should use (java.io.tmpdir).  Defaults to
@@ -156,6 +156,7 @@
 :doStop
 shift
 set ACTION=stop
+set CATALINA_OPTS=
 goto execCmd
 
 :doVersion

Modified: tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.sh
URL: http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.sh?view=diff&rev=558525&r1=558524&r2=558525
==============================================================================
--- tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.sh (original)
+++ tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.50.sh Sun Jul 22 11:37:58
2007
@@ -11,7 +11,7 @@
 #                   the same directory that CATALINA_HOME points to.
 #
 #   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
-#                   "stop", or "run" command is executed.
+#                   or "run" command is executed.
 #
 #   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
 #                   the JVM should use (java.io.tmpdir).  Defaults to
@@ -52,7 +52,7 @@
 while [ -h "$PRG" ]; do
   ls=`ls -ld "$PRG"`
   link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '.*/.*' > /dev/null; then
+  if expr "$link" : '/.*' > /dev/null; then
     PRG="$link"
   else
     PRG=`dirname "$PRG"`/"$link"
@@ -115,6 +115,12 @@
   CATALINA_TMPDIR="$CATALINA_BASE"/temp
 fi
 
+# Bugzilla 37848: When no TTY is available, don't output to console
+have_tty=0
+if [ "`tty`" != "not a tty" ]; then
+    have_tty=1
+fi
+
 # For Cygwin, switch paths to Windows format before running java
 if $cygwin; then
   JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
@@ -128,10 +134,13 @@
 
 # ----- Execute The Requested Command -----------------------------------------
 
-echo "Using CATALINA_BASE:   $CATALINA_BASE"
-echo "Using CATALINA_HOME:   $CATALINA_HOME"
-echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
-echo "Using JAVA_HOME:       $JAVA_HOME"
+# Bugzilla 37848: only output this if we have a TTY
+if [ $have_tty -eq 1 ]; then
+  echo "Using CATALINA_BASE:   $CATALINA_BASE"
+  echo "Using CATALINA_HOME:   $CATALINA_HOME"
+  echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
+  echo "Using JAVA_HOME:       $JAVA_HOME"
+fi
 
 if [ "$1" = "jpda" ] ; then
   if [ -z "$JPDA_TRANSPORT" ]; then
@@ -243,7 +252,7 @@
     FORCE=1
   fi
 
-  "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+  "$_RUNJAVA" $JAVA_OPTS \
     -classpath "$CLASSPATH" \
     -Dcatalina.base="$CATALINA_BASE" \
     -Dcatalina.home="$CATALINA_HOME" \
@@ -254,6 +263,8 @@
     if [ ! -z "$CATALINA_PID" ]; then
        echo "Killing: `cat $CATALINA_PID`"
        kill -9 `cat $CATALINA_PID`
+    else
+       echo "Kill failed: \$CATALINA_PID not set"
     fi
   fi
 

Modified: tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.bat
URL: http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.bat?view=diff&rev=558525&r1=558524&r2=558525
==============================================================================
--- tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.bat (original)
+++ tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.bat Sun Jul 22 11:37:58 2007
@@ -12,7 +12,7 @@
 rem                   the same directory that CATALINA_HOME points to.
 rem
 rem   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
-rem                   "stop", or "run" command is executed.
+rem                   or "run" command is executed.
 rem
 rem   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
 rem                   the JVM should use (java.io.tmpdir).  Defaults to
@@ -156,6 +156,7 @@
 :doStop
 shift
 set ACTION=stop
+set CATALINA_OPTS=
 goto execCmd
 
 :doVersion

Modified: tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.sh
URL: http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.sh?view=diff&rev=558525&r1=558524&r2=558525
==============================================================================
--- tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.sh (original)
+++ tomcat/container/branches/tc5.0.x/catalina/src/bin/catalina.sh Sun Jul 22 11:37:58 2007
@@ -11,7 +11,7 @@
 #                   the same directory that CATALINA_HOME points to.
 #
 #   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
-#                   "stop", or "run" command is executed.
+#                   or "run" command is executed.
 #
 #   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
 #                   the JVM should use (java.io.tmpdir).  Defaults to
@@ -52,7 +52,7 @@
 while [ -h "$PRG" ]; do
   ls=`ls -ld "$PRG"`
   link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '.*/.*' > /dev/null; then
+  if expr "$link" : '/.*' > /dev/null; then
     PRG="$link"
   else
     PRG=`dirname "$PRG"`/"$link"
@@ -124,6 +124,12 @@
   CATALINA_TMPDIR="$CATALINA_BASE"/temp
 fi
 
+# Bugzilla 37848: When no TTY is available, don't output to console
+have_tty=0
+if [ "`tty`" != "not a tty" ]; then
+    have_tty=1
+fi
+
 # For Cygwin, switch paths to Windows format before running java
 if $cygwin; then
   JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
@@ -137,10 +143,13 @@
 
 # ----- Execute The Requested Command -----------------------------------------
 
-echo "Using CATALINA_BASE:   $CATALINA_BASE"
-echo "Using CATALINA_HOME:   $CATALINA_HOME"
-echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
-echo "Using JAVA_HOME:       $JAVA_HOME"
+# Bugzilla 37848: only output this if we have a TTY
+if [ $have_tty -eq 1 ]; then
+  echo "Using CATALINA_BASE:   $CATALINA_BASE"
+  echo "Using CATALINA_HOME:   $CATALINA_HOME"
+  echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
+  echo "Using JAVA_HOME:       $JAVA_HOME"
+fi
 
 if [ "$1" = "jpda" ] ; then
   if [ -z "$JPDA_TRANSPORT" ]; then
@@ -252,7 +261,7 @@
     FORCE=1
   fi
 
-  "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+  "$_RUNJAVA" $JAVA_OPTS \
     -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
     -Dcatalina.base="$CATALINA_BASE" \
     -Dcatalina.home="$CATALINA_HOME" \
@@ -263,6 +272,8 @@
     if [ ! -z "$CATALINA_PID" ]; then
        echo "Killing: `cat $CATALINA_PID`"
        kill -9 `cat $CATALINA_PID`
+    else
+       echo "Kill failed: \$CATALINA_PID not set"
     fi
   fi
 

Modified: tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml?view=diff&rev=558525&r1=558524&r2=558525
==============================================================================
--- tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml Sun Jul 22 11:37:58 2007
@@ -9,6 +9,7 @@
   <properties>
     <author email="remm@apache.org">Remy Maucherat</author>
     <author>Yoav Shapira</author>
+    <author email="rjung@apache.org">Rainer Jung</author>
     <title>Tomcat 5.0 Changelog</title>
   </properties>
 
@@ -43,6 +44,26 @@
 
   <subsection name="Catalina">
     <changelog>
+      <fix>
+        <bug>38761</bug>: Handle relative symlinks to shell scripts as suggested
by Adam Murray.
+        Backport of r385888. (keith,rjung)
+      </fix>
+      <fix>
+        <bug>38194</bug>: Don't fail silently if -force is used without CATALINA_PID,
+        submitted by Matthew Buckett. Backport of r393867 from Tomcat 5.5.x. (yoavs,rjung)
+      </fix>
+      <fix>
+        <bug>37848</bug>: Only output catalina.sh diagnostic messages if we have
a TTY,
+        submitted by David Shaw. Backport of r394120 from Tomcat 5.5.x. (yoavs,rjung)
+      </fix>
+      <fix>
+        <bug>36976</bug>: Don't use CATALINA_OPTS when stopping Tomcat. This
+        allows options for starting and stopping to be set on JAVA_OPTS and
+        options for starting only to be set on CATALINA_OPTS. Without this
+        fix, some startup options (eg the port for remote JMX) would cause
+        stop to fail. Based on a fix suggested by Michael Vorburger.
+        Backport of r454193 from Tomcat 5.5.x. (markt,rjung)
+      </fix>
       <fix>
         Remove invalid attribute "encoding" of MBean MemoryUserDatabase,
         which lead to errors in the manager webapp JMXProxy output. (rjung)



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message