diff --git a/CHANGES.txt b/CHANGES.txt index d2f959ee48..1e31dcdc0d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -40,6 +40,7 @@ Merged from 4.1: * Fix StackOverflowError on ALTER after many previous schema changes (CASSANDRA-19166) * Memoize Cassandra verion (CASSANDRA-18902) 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) Merged from 3.11: Merged from 3.0: diff --git a/conf/cassandra-env.sh b/conf/cassandra-env.sh index 0b1dec45ed..4e28e687f9 100644 --- a/conf/cassandra-env.sh +++ b/conf/cassandra-env.sh @@ -272,7 +272,7 @@ JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.password.file=/etc/cassandra/ #MX4J_PORT="8081" 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 @@ -280,7 +280,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