https://issues.apache.org/bugzilla/show_bug.cgi?id=21695

--- Comment #4 from Rainer Jung <[email protected]> ---
readlink is not available on Solaris.

Here's a snippet from Tomcat bin/catalina.sh that is there since more than 7
years and seems to work reliably on many platforms (as we expect Tomcat to be
used on almost any platform):

...

# resolve links - $0 may be a softlink
PRG="$0"

while [ -h "$PRG" ]; do
  ls=`ls -ld "$PRG"`
  link=`expr "$ls" : '.*-> \(.*\)$'`
  if expr "$link" : '/.*' > /dev/null; then
    PRG="$link"
  else
    PRG=`dirname "$PRG"`/"$link"
  fi
done

# Get standard environment variables
PRGDIR=`dirname "$PRG"`

...

Regards,

Rainer

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to