jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1558834 - in /jmeter/trunk: bin/jmeter.sh xdocs/changes.xml
Date Thu, 16 Jan 2014 15:31:27 GMT
Author: sebb
Date: Thu Jan 16 15:31:26 2014
New Revision: 1558834

URL: http://svn.apache.org/r1558834
Log:
 Unix jmeter start script assumes it is on PATH, not a link
Bugzilla Id: 21695

Modified:
    jmeter/trunk/bin/jmeter.sh
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/bin/jmeter.sh
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/jmeter.sh?rev=1558834&r1=1558833&r2=1558834&view=diff
==============================================================================
--- jmeter/trunk/bin/jmeter.sh (original)
+++ jmeter/trunk/bin/jmeter.sh Thu Jan 16 15:31:26 2014
@@ -35,4 +35,21 @@ case $(uname) in
    ;;
 esac
 
-java $JVM_ARGS $JMETER_OPTS -jar `dirname $0`/ApacheJMeter.jar "$@"
+
+# resolve links - $0 may be a softlink (code as used by Tomcat)
+# N.B. readlink would be a lot simpler but is not supported on Solaris
+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
+
+PRGDIR=`dirname "$PRG"`
+
+java $JVM_ARGS $JMETER_OPTS -jar "$PRGDIR/ApacheJMeter.jar" "$@"

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1558834&r1=1558833&r2=1558834&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Thu Jan 16 15:31:26 2014
@@ -190,6 +190,7 @@ A workaround is to use a Java 7 update 4
 
 <h3>General</h3>
 <ul>
+<li><bugzilla>21695</bugzilla> -  Unix jmeter start script assumes it is
on PATH, not a link</li>
 </ul>
 
 <ch_section>Non-functional changes</ch_section>



Mime
View raw message