component(developer/golang-123): Add Component
[oi-userland.git] / components / web / tomcat-8 / patches / setenv.patch
blob9ae02bb1f0cb548040e260426f29397d5ca6e867
1 Patch origin: in-house
2 Patch status: Solaris-specific; not suitable for upstream
4 Support for setenv.sh in $CATALINA_BASE/conf.
6 diff --git a/bin/catalina.sh b/bin/catalina.sh
7 index 55fd90b..0788da8 100644
8 --- a/bin/catalina.sh
9 +++ b/bin/catalina.sh
10 @@ -145,7 +145,13 @@ PRGDIR=`dirname "$PRG"`
11 # but allow them to be specified in setenv.sh, in rare case when it is needed.
12 CLASSPATH=
14 -if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
15 +# On Solaris we install Tomcat into two different locations
16 +# (CATALINA_HOME, CATALINA_BASE). CATALINA_HOME can be on read only
17 +# location and CATALINA_BASE doesn't contain bin directory. Therefore we
18 +# will look for setenv.sh file in CATALINA_BASE/conf directory first.
19 +if [ -r "$CATALINA_BASE/conf/setenv.sh" ]; then
20 + . "$CATALINA_BASE/conf/setenv.sh"
21 +elif [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
22 . "$CATALINA_BASE/bin/setenv.sh"
23 elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
24 . "$CATALINA_HOME/bin/setenv.sh"
25 diff --git a/bin/tool-wrapper.sh b/bin/tool-wrapper.sh
26 index f9924da..c4443ed 100644
27 --- a/bin/tool-wrapper.sh
28 +++ b/bin/tool-wrapper.sh
29 @@ -74,7 +74,15 @@ PRGDIR=`dirname "$PRG"`
30 # but allow them to be specified in setenv.sh, in rare case when it is needed.
31 CLASSPATH=
33 -if [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
34 +# On Solaris we install Tomcat into two different locations
35 +# (CATALINA_HOME, CATALINA_BASE). CATALINA_HOME can be on read only
36 +# location and CATALINA_BASE doesn't contain bin directory. Therefore we
37 +# will look for setenv.sh file in CATALINA_BASE/conf directory first.
38 +if [ -r "$CATALINA_BASE/conf/setenv.sh" ]; then
39 + . "$CATALINA_BASE/conf/setenv.sh"
40 +elif [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
41 + . "$CATALINA_BASE/bin/setenv.sh"
42 +elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
43 . "$CATALINA_HOME/bin/setenv.sh"