<p dir="auto">The solaris scripts are using grep with the -E option. This option is not supported in the default distribution.</p>
<p dir="auto">[ Dec 28 15:11:22 Disabled. ]<br>
[ Dec 28 15:12:11 Enabled. ]<br>
[ Dec 28 15:12:11 Executing start method ("/scratch/elasticsearch/bin/elasticsearch"). ]<br>
grep: illegal option -- E</p>
<p dir="auto">Since Elasticsearch 2.1.1 the elasticsearch startup script has contained this line:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="daemonized=`echo $* | grep -E -- '(^-d |-d$| -d |--daemonize$|--daemonize )'`"><pre class="notranslate"><code class="notranslate">daemonized=`echo $* | grep -E -- '(^-d |-d$| -d |--daemonize$|--daemonize )'`
</code></pre></div>
<p dir="auto">This means Elasticsearch 2.1 doesn't start on Solaris.  Changing grep -E to egrep makes it work on all of Solaris, Linux and Mac OS X:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="daemonized=`echo $* | egrep -- '(^-d |-d$| -d |--daemonize$|--daemonize )'`"><pre class="notranslate"><code class="notranslate">daemonized=`echo $* | egrep -- '(^-d |-d$| -d |--daemonize$|--daemonize )'`
</code></pre></div>
<p dir="auto">On Solaris:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ echo -d -x -g --hello | grep -E -- '(^-d |-d$| -d |--daemonize$|--daemonize )'
grep: illegal option -- E
Usage: grep [-c|-l|-q] -bhinsvw pattern file . . .
$ echo -d -x -g --hello | egrep -- '(^-d |-d$| -d |--daemonize$|--daemonize )'
-d -x -g --hello"><pre class="notranslate"><code class="notranslate">$ echo -d -x -g --hello | grep -E -- '(^-d |-d$| -d |--daemonize$|--daemonize )'
grep: illegal option -- E
Usage: grep [-c|-l|-q] -bhinsvw pattern file . . .
$ echo -d -x -g --hello | egrep -- '(^-d |-d$| -d |--daemonize$|--daemonize )'
-d -x -g --hello
</code></pre></div>
<p dir="auto">On Linux and Mac OS X:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ echo -d -x -g --hello | grep -E -- '(^-d |-d$| -d |--daemonize$|--daemonize )'
-d -x -g --hello
$ echo -d -x -g --hello | egrep -- '(^-d |-d$| -d |--daemonize$|--daemonize )'
-d -x -g --hello"><pre class="notranslate"><code class="notranslate">$ echo -d -x -g --hello | grep -E -- '(^-d |-d$| -d |--daemonize$|--daemonize )'
-d -x -g --hello
$ echo -d -x -g --hello | egrep -- '(^-d |-d$| -d |--daemonize$|--daemonize )'
-d -x -g --hello
</code></pre></div>
<p dir="auto">However, I am not sure if there are other platforms where egrep wouldn't work, so if there are any others you want to support you might want to check them too.</p>