ElasticSearch shell script fails due to unsupported syntax on non-Bash shells


(Brian Yoder) #1

In version 0.90.3 (at least), the first line of the elasticsearch start-up
script is:

#!/bin/sh

And on line 92 the line is:

JAVA=$(which java)

But, not all Unix-based systems point /bin/sh to /bin/bash or /bin/ksh.
And the $(command) syntax is not supported by the Bourne shell or by dash
(Ubuntu) to which /bin/sh is sometimes linked by default.

The correct fix would probably be to change line 92 to use the backtics
that all of the shells support:

JAVA=which java

I've opened the following bug to report this:

Brian

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #2