[
https://issues.apache.org/jira/browse/CASSANDRA-2499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021889#comment-13021889
]
Jackson Chung commented on CASSANDRA-2499:
------------------------------------------
chances are the default /bin/sh is linked to dash, please run a ls -al /bin/sh
to confirm
a minor fix could be remove the [[ and add "" around the variables and values.
-if [[ $java_version != *OpenJDK* ]]
+if [ "$java_version" != "*OpenJDK*" ]
a more drastic fix is to update all the /bin/sh with /bin/bash (if desired to
only support on bash)
see ref: https://wiki.ubuntu.com/DashAsBinSh
suggest to be reviewed to make a decision.
> cassandra-env.sh pattern matching for OpenJDK broken in some cases
> ------------------------------------------------------------------
>
> Key: CASSANDRA-2499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2499
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.8
> Reporter: Tyler Hobbs
> Assignee: Eric Evans
> Fix For: 0.8
>
>
> With bash version 4.1.5, the section of cassandra-env that tries to match the
> JDK distribution seems to have some kind of syntax error. I get the
> following message when running bin/cassandra:
> {noformat}
> bin/../conf/cassandra-env.sh: 99: [[: not found
> {noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira