cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1095488 - /cassandra/branches/cassandra-0.8/conf/cassandra-env.sh
Date Wed, 20 Apr 2011 19:16:36 GMT
Author: jbellis
Date: Wed Apr 20 19:16:35 2011
New Revision: 1095488

URL: http://svn.apache.org/viewvc?rev=1095488&view=rev
Log:
fix jdk verison check for sh/dash
patch by Jackson Chung; reviewed by thobbs and jbellis for CASSANDRA-2499

Modified:
    cassandra/branches/cassandra-0.8/conf/cassandra-env.sh

Modified: cassandra/branches/cassandra-0.8/conf/cassandra-env.sh
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/conf/cassandra-env.sh?rev=1095488&r1=1095487&r2=1095488&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/conf/cassandra-env.sh (original)
+++ cassandra/branches/cassandra-0.8/conf/cassandra-env.sh Wed Apr 20 19:16:35 2011
@@ -92,8 +92,8 @@ JMX_PORT="7199"
 JVM_OPTS="$JVM_OPTS -ea"
 
 # add the jamm javaagent
-java_version=`java -version 2>&1`
-if [[ $java_version != *OpenJDK* ]]
+check_openjdk=$(java -version 2>&1 | awk '{if (NR == 2) {print $1}}')
+if [ "$check_openjdk" != "OpenJDK" ]
 then
     JVM_OPTS="$JVM_OPTS -javaagent:$CASSANDRA_HOME/lib/jamm-0.2.1.jar"
 fi



Mime
View raw message