Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

starting elasticsearch on solaris fails (1.0.0.Beta2-SNAPSHOT) #4314

Closed
ah85 opened this issue Dec 2, 2013 · 2 comments
Closed

starting elasticsearch on solaris fails (1.0.0.Beta2-SNAPSHOT) #4314

ah85 opened this issue Dec 2, 2013 · 2 comments

Comments

@ah85
Copy link

ah85 commented Dec 2, 2013

When executing bin/elasticsearch on solaris, I got this error:

./elasticsearch: syntax error at line 92: `JAVA=$' unexpected

Had to change this line:
JAVA=$(which java)
to:
JAVA=which java``

This also makes it consistent with the rest of the file.

Version: 1.0.0.Beta2-SNAPSHOT

spinscale added a commit that referenced this issue Dec 3, 2013
Make sure that every call in a shell script is supported by /bin/sh and not a bashism, like $()

Closes #4314
@spinscale
Copy link
Contributor

Thanks a lot for notifying! Took the opportunity and removed any $(whatever) bashism by using backticks.

@tmzullinger
Copy link

FWIW, $() is not a bashism. It is defined in POSIX¹. If /bin/sh on Solaris doesn't accept this, it's because it's an ancient shell (not surprising, given how ancient most of the tools on Solaris are).

That might still be a reason to use backticks, but it's incorrect to call this a bashism. When working around old shells on systems like Solaris, it's worth noting that's the problem so the work around can be removed when those ancient systems are no longer supported. (As I understand it, even Solaris has a proper posix sh, it just isn't always /bin/sh.)

¹ http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_03

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
Make sure that every call in a shell script is supported by /bin/sh and not a bashism, like $()

Closes elastic#4314
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants