Refix https://issues.apache.org/bugzilla/show_bug.cgi?id=37848
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 21 Oct 2009 21:40:21 +0000 (21:40 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 21 Oct 2009 21:40:21 +0000 (21:40 +0000)
Don't output info messages if there is no terminal
Patch provided by Eric Herman

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@828225 13f79535-47bb-0310-9956-ffa450edef68

bin/catalina.sh

index 6114e01..bb957d7 100755 (executable)
@@ -248,7 +248,9 @@ if [ "$1" = "debug" ] ; then
   else
     shift
     if [ "$1" = "-security" ] ; then
-      echo "Using Security Manager"
+      if [ $have_tty -eq 1 ]; then
+        echo "Using Security Manager"
+      fi
       shift
       exec "$_RUNJDB" "$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
         -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
@@ -274,7 +276,9 @@ elif [ "$1" = "run" ]; then
 
   shift
   if [ "$1" = "-security" ] ; then
-    echo "Using Security Manager"
+    if [ $have_tty -eq 1 ]; then
+      echo "Using Security Manager"
+    fi
     shift
     exec "$_RUNJAVA" "$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
       -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
@@ -305,7 +309,9 @@ elif [ "$1" = "start" ] ; then
   shift
   touch "$CATALINA_BASE"/logs/catalina.out
   if [ "$1" = "-security" ] ; then
-    echo "Using Security Manager"
+    if [ $have_tty -eq 1 ]; then
+      echo "Using Security Manager"
+    fi
     shift
     "$_RUNJAVA" "$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
       -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \