Summary: | Java version check in bin/jmeter script in 2.12 fails on Solaris 10 | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | Michael Strasser <michael.strasser> |
Component: | Main | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P5 | ||
Version: | 2.12 | ||
Target Milestone: | --- | ||
Hardware: | Sun | ||
OS: | Solaris |
Description
Michael Strasser
2015-02-19 23:16:11 UTC
Could you please check, whether CURRENT_VERSION=`"$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}'` works for you? It should be compatible with any shel. Any other problems with the script? Thanks, Rainer Hi Rainer, thanks for your quick response. Replacing $( ... ) with ` ... ` works in this Solaris shell. There was also a problem with the awk command in the same line. The version of awk on Solaris 10 cannot have a space between the -F option and the field separator (gawk allows one). Here is a diff between the original and the version that works on Solaris: -bash-3.2$ diff jmeter.orig jmeter 32,34c32,34 < CURRENT_VERSION=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}') < minimal_version=$(echo $MINIMAL_VERSION | awk -F'.' '{ print $2 }') < current_version=$(echo $CURRENT_VERSION | awk -F'.' '{ print $2 }') --- > CURRENT_VERSION=`"$_java" -version 2>&1 | awk -F'"' '/version/ {print $2}'` > minimal_version=`echo $MINIMAL_VERSION | awk -F'.' '{ print $2 }'` > current_version=`echo $CURRENT_VERSION | awk -F'.' '{ print $2 }'` 46c46 < case $(uname) in --- > case `uname` in I also fixed the $(uname) and applied the change to both, bin/jmeter.sh and bin/jmeter which in trunk both had the problematic lines. No other JMeter shell scripts seem to use the sub shell notation $(...). Date: Fri Feb 20 05:15:13 2015 New Revision: 1661060 URL: http://svn.apache.org/r1661060 Log: Bug 57608 - Java version check in bin/jmeter script in 2.12 fails on Solaris 10 Bugzilla Id: 57608 Modified: jmeter/trunk/bin/jmeter jmeter/trunk/bin/jmeter.sh jmeter/trunk/xdocs/changes.xml This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3544 |