Author: markt
Date: Thu Aug 31 14:58:18 2017
New Revision: 1806807
URL: http://svn.apache.org/viewvc?rev=1806807&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=61441
Improve the detection of JAVA_HOME by the daemon.sh script when running on a
platform where Java has been installed from an RPM.
Modified:
tomcat/trunk/bin/daemon.sh
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/bin/daemon.sh
URL:
http://svn.apache.org/viewvc/tomcat/trunk/bin/daemon.sh?rev=1806807&r1=1806806&r2=1806807&view=diff
==============================================================================
--- tomcat/trunk/bin/daemon.sh (original)
+++ tomcat/trunk/bin/daemon.sh Thu Aug 31 14:58:18 2017
@@ -94,6 +94,15 @@ test ".$TOMCAT_USER" = . && TOMCAT_USER=
#
if [ -z "$JAVA_HOME" ]; then
JAVA_BIN="`which java 2>/dev/null || type java 2>&1`"
+ while [ -h "$JAVA_BIN" ]; do
+ ls=`ls -ld "$JAVA_BIN"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ JAVA_BIN="$link"
+ else
+ JAVA_BIN="`dirname $JAVA_BIN`/$link"
+ fi
+ done
test -x "$JAVA_BIN" && JAVA_HOME="`dirname $JAVA_BIN`"
test ".$JAVA_HOME" != . && JAVA_HOME=`cd "$JAVA_HOME/.." >/dev/null; pwd`
else
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1806807&r1=1806806&r2=1806807&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Aug 31 14:58:18 2017
@@ -205,6 +205,11 @@
embedded distribution to provide end users with greater flexibility to
handle potential conflicts with the JRE and/or other JARs. (markt)
</fix>
+ <fix>
+ <bug>61441</bug>: Improve the detection of <code>JAVA_HOME</code> by
the
+ <code>daemon.sh</code> script when running on a platform where Java has
+ been installed from an RPM. (rjung)
+ </fix>
</changelog>
</subsection>
</section>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]