22239597 setenv.sh support in conf/ was left during update to version 8 s11u3-sru
authorPetr Sumbera <petr.sumbera@oracle.com>
Tue, 29 Dec 2015 08:50:32 -0800
branchs11u3-sru
changeset 5319 cfb66c73d0f2
parent 5318 efa7f7393e63
child 5320 4ec6f72e88e0
22239597 setenv.sh support in conf/ was left during update to version 8
components/tomcat-8/patches/setenv.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/tomcat-8/patches/setenv.patch	Tue Dec 29 08:50:32 2015 -0800
@@ -0,0 +1,43 @@
+Patch origin: in-house
+Patch status: Solaris-specific; not suitable for upstream
+
+Support for setenv.sh in $CATALINA_BASE/conf.
+
+--- bin/catalina.sh
++++ bin/catalina.sh
+@@ -145,7 +146,13 @@
+ # but allow them to be specified in setenv.sh, in rare case when it is needed.
+ CLASSPATH=
+ 
+-if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
++# On Solaris we install Tomcat into two different locations
++# (CATALINA_HOME, CATALINA_BASE). CATALINA_HOME can be on read only
++# location and CATALINA_BASE doesn't contain bin directory. Therefore we
++# will look for setenv.sh file in CATALINA_BASE/conf directory first.
++if [ -r "$CATALINA_BASE/conf/setenv.sh" ]; then
++  . "$CATALINA_BASE/conf/setenv.sh"
++elif [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
+   . "$CATALINA_BASE/bin/setenv.sh"
+ elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
+   . "$CATALINA_HOME/bin/setenv.sh"
+--- bin/tool-wrapper.sh
++++ bin/tool-wrapper.sh
+@@ -73,8 +75,16 @@
+ # but allow them to be specified in setenv.sh, in rare case when it is needed.
+ CLASSPATH=
+ 
+-if [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
+-  . "$CATALINA_HOME/bin/setenv.sh"
++# On Solaris we install Tomcat into two different locations
++# (CATALINA_HOME, CATALINA_BASE). CATALINA_HOME can be on read only
++# location and CATALINA_BASE doesn't contain bin directory. Therefore we
++# will look for setenv.sh file in CATALINA_BASE/conf directory first.
++if [ -r "$CATALINA_BASE/conf/setenv.sh" ]; then
++  . "$CATALINA_BASE/conf/setenv.sh"
++elif [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
++  . "$CATALINA_BASE/bin/setenv.sh"
++elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
++  . "$CATALINA_HOME/bin/setenv.sh"
+ fi
+ 
+ # For Cygwin, ensure paths are in UNIX format before anything is touched