components/tomcat/patches/env.patch
branchs11-update
changeset 2726 2582b1cfd19c
parent 2602 5caab247ea3d
child 3959 0de894549bd0
child 4146 097063f324c0
equal deleted inserted replaced
2725:f91ddd7e55a2 2726:2582b1cfd19c
     1 --- apache-tomcat-6.0.35-src/bin/catalina.sh	Mon Nov 28 02:22:44 2011
     1 --- apache-tomcat-6.0.37-src/bin/catalina.sh	Mon Apr 29 02:36:52 2013
     2 +++ apache-tomcat-6.0.35-src/bin/catalina.sh	Mon Apr 16 08:42:47 2012
     2 +++ apache-tomcat-6.0.37-src/bin/catalina.sh	Thu Jun 13 05:37:46 2013
     3 @@ -92,6 +92,7 @@
     3 @@ -92,6 +92,7 @@
     4  CYGWIN*) cygwin=true;;
     4  CYGWIN*) cygwin=true;;
     5  OS400*) os400=true;;
     5  OS400*) os400=true;;
     6  Darwin*) darwin=true;;
     6  Darwin*) darwin=true;;
     7 +SunOS*) solaris=true;;
     7 +SunOS*) solaris=true;;
     8  esac
     8  esac
     9  
     9  
    10  # resolve links - $0 may be a softlink
    10  # resolve links - $0 may be a softlink
    11 @@ -120,8 +121,19 @@
    11 @@ -120,7 +121,13 @@
    12  # but allow them to be specified in setenv.sh, in rare case when it is needed.
    12  # but allow them to be specified in setenv.sh, in rare case when it is needed.
    13  CLASSPATH=
    13  CLASSPATH=
    14  
    14  
    15 -if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
    15 -if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
    16 -  . "$CATALINA_BASE/bin/setenv.sh"
    16 +# On Solaris we install Tomcat into two different locations
    17 +# On Solaris we want to allow running system Tomcat instance (where
    17 +# (CATALINA_HOME, CATALINA_BASE). CATALINA_HOME can be on read only
    18 +# setenv.sh file is located in /var/tomcat6/conf) in parallel to Tomcat
    18 +# location and CATALINA_BASE doesn't contain bin directory. Therefore we
    19 +# instances started by individual users. As it's expected that all will
    19 +# will look for setenv.sh file in CATALINA_BASE/conf directory first.
    20 +# use the same copy of catalina.sh some extra logic needs to be added
    20 +if [ -r "$CATALINA_BASE/conf/setenv.sh" ]; then
    21 +# here:
    21 +  . "$CATALINA_BASE/conf/setenv.sh"
    22 +if [ "$CATALINA_BASE" = "/var/tomcat6" ]; then
    22 +elif [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
    23 +  SETENVDIR="conf"
    23    . "$CATALINA_BASE/bin/setenv.sh"
    24 +else
       
    25 +  SETENVDIR="bin"
       
    26 +fi
       
    27 +
       
    28 +if [ -r "$CATALINA_BASE/$SETENVDIR/setenv.sh" ]; then
       
    29 +  . "$CATALINA_BASE/$SETENVDIR/setenv.sh"
       
    30  elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
    24  elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
    31    . "$CATALINA_HOME/bin/setenv.sh"
    25    . "$CATALINA_HOME/bin/setenv.sh"
    32  fi
    26 @@ -147,6 +154,11 @@
    33 @@ -147,6 +159,11 @@
       
    34    export QIBM_MULTI_THREADED=Y
    27    export QIBM_MULTI_THREADED=Y
    35  fi
    28  fi
    36  
    29  
    37 +# For Solaris
    30 +# For Solaris
    38 +if $solaris; then
    31 +if $solaris; then
    40 +fi
    33 +fi
    41 +
    34 +
    42  # Get standard Java environment variables
    35  # Get standard Java environment variables
    43  if $os400; then
    36  if $os400; then
    44    # -r will Only work on the os400 if the files are:
    37    # -r will Only work on the os400 if the files are:
    45 --- apache-tomcat-6.0.35-src/bin/tool-wrapper.sh	Mon Nov 28 02:22:44 2011
    38 --- apache-tomcat-6.0.37-src/bin/tool-wrapper.sh	Mon Apr 29 02:36:52 2013
    46 +++ apache-tomcat-6.0.35-src/bin/tool-wrapper.sh	Mon Apr 16 08:42:57 2012
    39 +++ apache-tomcat-6.0.37-src/bin/tool-wrapper.sh	Thu Jun 13 05:55:06 2013
    47 @@ -35,8 +35,10 @@
    40 @@ -35,8 +35,10 @@
    48  
    41  
    49  # OS specific support.  $var _must_ be set to either true or false.
    42  # OS specific support.  $var _must_ be set to either true or false.
    50  cygwin=false
    43  cygwin=false
    51 +solaris=false
    44 +solaris=false
    53  CYGWIN*) cygwin=true;;
    46  CYGWIN*) cygwin=true;;
    54 +SunOS*) solaris=true;;
    47 +SunOS*) solaris=true;;
    55  esac
    48  esac
    56  
    49  
    57  # resolve links - $0 may be a softlink
    50  # resolve links - $0 may be a softlink
    58 @@ -60,10 +62,23 @@
    51 @@ -60,8 +62,16 @@
    59  # but allow them to be specified in setenv.sh, in rare case when it is needed.
    52  # but allow them to be specified in setenv.sh, in rare case when it is needed.
    60  CLASSPATH=
    53  CLASSPATH=
    61  
    54  
    62 -if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
    55 -if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
    63 -  . "$CATALINA_HOME"/bin/setenv.sh
    56 -  . "$CATALINA_HOME"/bin/setenv.sh
    64 +# On Solaris we want to allow running system Tomcat instance (where
    57 +# On Solaris we install Tomcat into two different locations
    65 +# setenv.sh file is located in /var/tomcat6/conf) in parallel to Tomcat
    58 +# (CATALINA_HOME, CATALINA_BASE). CATALINA_HOME can be on read only
    66 +# instances started by individual users. As it's expected that all will
    59 +# location and CATALINA_BASE doesn't contain bin directory. Therefore we
    67 +# use the same copy of catalina.sh some extra logic needs to be added
    60 +# will look for setenv.sh file in CATALINA_BASE/conf directory first.
    68 +# here:
    61 +if [ -r "$CATALINA_BASE/conf/setenv.sh" ]; then
    69 +if [ "$CATALINA_BASE" = "/var/tomcat6" ]; then
    62 +  . "$CATALINA_BASE/conf/setenv.sh"
    70 +  SETENVDIR="conf"
    63 +elif [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
    71 +else
    64 +  . "$CATALINA_BASE/bin/setenv.sh"
    72 +  SETENVDIR="bin"
    65 +elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
       
    66 +  . "$CATALINA_HOME/bin/setenv.sh"
    73  fi
    67  fi
    74  
    68  
    75 +if [ -r "$CATALINA_BASE/$SETENVDIR/setenv.sh" ]; then
       
    76 +  . "$CATALINA_BASE/$SETENVDIR/setenv.sh"
       
    77 +elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
       
    78 +  . "$CATALINA_HOME/bin/setenv.sh"
       
    79 +fi
       
    80 +
       
    81  # For Cygwin, ensure paths are in UNIX format before anything is touched
    69  # For Cygwin, ensure paths are in UNIX format before anything is touched
    82  if $cygwin; then
    70 @@ -71,6 +81,11 @@
    83    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
       
    84 @@ -71,6 +86,11 @@
       
    85    [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
    71    [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
    86  fi
    72  fi
    87  
    73  
    88 +# For Solaris
    74 +# For Solaris
    89 +if $solaris; then
    75 +if $solaris; then