https://bz.apache.org/bugzilla/show_bug.cgi?id=61441

--- Comment #3 from Rainer Jung <rainer.j...@kippdata.de> ---
What about the following addition, copied and adjusted from the top of the file
where it is used to resolve another possible symlink:

Index: bin/daemon.sh
===================================================================
--- bin/daemon.sh       (revision 1805340)
+++ bin/daemon.sh       (working copy)
@@ -94,6 +94,15 @@
 #
 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


Does that work?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to