DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37848>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37848

           Summary: Inappropriate Output From catalina.sh When No Terminal
                    Available
           Product: Tomcat 5
           Version: 5.5.13
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: trivial
          Priority: P4
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


bin/catalina.sh issues some informational output to "stdout" when executed. If
Tomcat is being started by a Unix init script (ie. as part of the boot process),
then this output disrupts the boot messages. It would be useful if this output
was only issued when Tomcat is being started from the command line.

A simple patch is included below:

-----patch file-----------------------------------------------------------------
--- catalina.sh 2005-12-09 10:22:44.000000000 +1100
+++ catalina.sh 2005-12-09 10:24:30.000000000 +1100
@@ -131,6 +131,11 @@
   CATALINA_TMPDIR="$CATALINA_BASE"/temp
 fi

+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"`
@@ -150,13 +155,15 @@

 # ----- Execute The Requested Command -------------------------------


-echo "Using CATALINA_BASE:   $CATALINA_BASE"
-echo "Using CATALINA_HOME:   $CATALINA_HOME"
-echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
-if [ "$1" = "debug" -o "$1" = "javac" ] ; then
-  echo "Using JAVA_HOME:       $JAVA_HOME"
-else
-  echo "Using JRE_HOME:       $JRE_HOME"
+if [ $have_tty -eq 1 ]; then
+  echo "Using CATALINA_BASE:   $CATALINA_BASE"
+  echo "Using CATALINA_HOME:   $CATALINA_HOME"
+  echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
+  if [ "$1" = "debug" -o "$1" = "javac" ] ; then
+    echo "Using JAVA_HOME:       $JAVA_HOME"
+  else
+    echo "Using JRE_HOME:       $JRE_HOME"
+  fi
 fi

 if [ "$1" = "jpda" ] ; then

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to