Author: rdonkin
Date: Thu Jul 2 14:44:15 2009
New Revision: 790604
URL: http://svn.apache.org/viewvc?rev=790604&view=rev
Log:
JAMES-912 Applied patch to improve recognition of symbolic links when starting
from a relative path. Thanks to Amichai Rothman.
https://issues.apache.org/jira/browse/JAMES-912
Modified:
james/server/branches/v2.3/phoenix-bin/bin/phoenix.sh
Modified: james/server/branches/v2.3/phoenix-bin/bin/phoenix.sh
URL:
http://svn.apache.org/viewvc/james/server/branches/v2.3/phoenix-bin/bin/phoenix.sh?rev=790604&r1=790603&r2=790604&view=diff
==============================================================================
--- james/server/branches/v2.3/phoenix-bin/bin/phoenix.sh (original)
+++ james/server/branches/v2.3/phoenix-bin/bin/phoenix.sh Thu Jul 2 14:44:15
2009
@@ -51,13 +51,14 @@
CYGWIN*) cygwin=true;;
esac
-# resolve links - $0 may be a softlink
-THIS_PROG="$0"
+# resolve links - $0 may be a softlink (including relative links)
+PRGDIR=`dirname "$0"`
+THIS_PROG=`cd "$PRGDIR" ; pwd`/`basename "$0"`
while [ -h "$THIS_PROG" ]; do
ls=`ls -ld "$THIS_PROG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '.*/.*' > /dev/null; then
+ if expr "$link" : '^/.*' > /dev/null; then
THIS_PROG="$link"
else
THIS_PROG=`dirname "$THIS_PROG"`/"$link"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]