diff --git a/CHANGES.txt b/CHANGES.txt index 30413804a5..bb93d9d802 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -20,6 +20,7 @@ Merged from 4.1: * Memoize Cassandra verion and add a backoff interval for failed schema pulls (CASSANDRA-18902) * Fix StackOverflowError on ALTER after many previous schema changes (CASSANDRA-19166) Merged from 4.0: + * Remove bashisms for mx4j tool in cassandra-env.sh (CASSANDRA-19416) * Add new concurrent_merkle_tree_requests config property to prevent OOM during multi-range and/or multi-table repairs (CASSANDRA-19336) * Skip version check if an endpoint is dead state in Gossiper#upgradeFromVersionSupplier (CASSANDRA-19187) * Fix Gossiper::hasMajorVersion3Nodes to return false during minor upgrade (CASSANDRA-18999) diff --git a/conf/cassandra-env.sh b/conf/cassandra-env.sh index cf6399560f..ba9f9d4596 100644 --- a/conf/cassandra-env.sh +++ b/conf/cassandra-env.sh @@ -277,7 +277,7 @@ JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.password.file=/etc/cassandra/ JVM_OPTS="$JVM_OPTS -Djava.library.path=$CASSANDRA_HOME/lib/sigar-bin" if [ "x$MX4J_ADDRESS" != "x" ]; then - if [[ "$MX4J_ADDRESS" == \-Dmx4jaddress* ]]; then + if [ "$(echo "$MX4J_ADDRESS" | grep -c "\-Dmx4jaddress")" = "1" ]; then # Backward compatible with the older style #13578 JVM_OPTS="$JVM_OPTS $MX4J_ADDRESS" else @@ -285,7 +285,7 @@ if [ "x$MX4J_ADDRESS" != "x" ]; then fi fi if [ "x$MX4J_PORT" != "x" ]; then - if [[ "$MX4J_PORT" == \-Dmx4jport* ]]; then + if [ "$(echo "$MX4J_PORT" | grep -c "\-Dmx4jport")" = "1" ]; then # Backward compatible with the older style #13578 JVM_OPTS="$JVM_OPTS $MX4J_PORT" else