cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r953522 - in /cassandra/branches/cassandra-0.6: CHANGES.txt debian/init
Date Fri, 11 Jun 2010 00:50:02 GMT
Author: jbellis
Date: Fri Jun 11 00:50:02 2010
New Revision: 953522

URL: http://svn.apache.org/viewvc?rev=953522&view=rev
Log:
prefer sun jdk to openjdk in debian init script.  patch by Coda Hale; reviewed by jbellis
for CASSANDRA-1174

Modified:
    cassandra/branches/cassandra-0.6/CHANGES.txt
    cassandra/branches/cassandra-0.6/debian/init

Modified: cassandra/branches/cassandra-0.6/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/CHANGES.txt?rev=953522&r1=953521&r2=953522&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.6/CHANGES.txt Fri Jun 11 00:50:02 2010
@@ -12,6 +12,7 @@
    columns (CASSANDRA-1139)
  * avoid preserving login information after client disconnects
    (CASSANDRA-1057)
+ * prefer sun jdk to openjdk in debian init script (CASSANDRA-1174)
  * detect partioner config changes between restarts and fail fast 
    (CASSANDRA-1146)
  * use generation time to resolve node token reassignment disagreements

Modified: cassandra/branches/cassandra-0.6/debian/init
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/debian/init?rev=953522&r1=953521&r2=953522&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/debian/init (original)
+++ cassandra/branches/cassandra-0.6/debian/init Fri Jun 11 00:50:02 2010
@@ -17,11 +17,21 @@ NAME=cassandra
 PIDFILE=/var/run/$NAME.pid
 SCRIPTNAME=/etc/init.d/$NAME
 CONFDIR=/etc/cassandra
-JAVA_HOME="/usr/lib/jvm/java-6-openjdk/jre"
 JSVC=/usr/bin/jsvc
 JVM_MAX_MEM="1G"
 JVM_START_MEM="128M"
 
+# The first existing directory is used for JAVA_HOME
+JDK_DIRS="/usr/lib/jvm/java-6-sun /usr/lib/jvm/java-6-openjdk"
+
+# Look for the right JVM to use
+for jdir in $JDK_DIRS; do
+ if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
+ JAVA_HOME="$jdir"
+ fi
+done
+
+
 [ -e /usr/share/cassandra/apache-cassandra.jar ] || exit 0
 [ -e /etc/cassandra/storage-conf.xml ] || exit 0
 



Mime
View raw message