Remove unnecessary directory push/pop from scripts

This commit proposes removing an unnecessary directory push/pop from the
X-Pack scripts. It is not clear exactly why these were added, the
original change was almost three years ago in
elastic/x-pack@ea9ba7cdd0 but
unfortunately the commit message does not elucidate the exact the
problem, nor is there an associated pull request. This change has
propogated into all of the X-Pack scripts yet still the reasons are
unclear. The little that we can glean from the commit message is that
there was a problem with the default paths if the script was executed
outside of the Elasticsearch home. It seems that such issues have been
addressed by the recent introduction of elasticsearch-env so maybe we
can simplify these scripts here?

Relates elastic/x-pack-elasticsearch#2125

Original commit: elastic/x-pack-elasticsearch@9548c47743
This commit is contained in:
Jason Tedor 2017-07-31 23:13:22 +09:00 committed by GitHub
parent a80b1e4de1
commit c51e6e1cd6
7 changed files with 14 additions and 49 deletions

View File

@ -8,16 +8,11 @@ source "`dirname "$0"`"/../elasticsearch-env
source "`dirname "$0"`"/x-pack-env
cd "$ES_HOME" > /dev/null
"$JAVA" \
exec \
"$JAVA" \
$ES_JAVA_OPTS \
-Des.path.home="$ES_HOME" \
-Des.path.conf="$CONF_DIR" \
-cp "$ES_CLASSPATH" \
org.elasticsearch.xpack.ssl.CertificateTool \
"$@"
status=$?
cd - > /dev/null
exit $status

View File

@ -8,16 +8,11 @@ source "`dirname "$0"`"/../elasticsearch-env
source "`dirname "$0"`"/x-pack-env
cd "$ES_HOME" > /dev/null
"$JAVA" \
exec \
"$JAVA" \
$ES_JAVA_OPTS \
-Des.path.home="$ES_HOME" \
-Des.path.conf="$CONF_DIR" \
-cp "$ES_CLASSPATH" \
org.elasticsearch.xpack.watcher.trigger.schedule.tool.CronEvalTool \
"$@"
status=$?
cd - > /dev/null
exit $status

View File

@ -8,16 +8,11 @@ source "`dirname "$0"`"/../elasticsearch-env
source "`dirname "$0"`"/x-pack-env
cd "$ES_HOME" > /dev/null
"$JAVA" \
exec \
"$JAVA" \
$ES_JAVA_OPTS \
-Des.path.home="$ES_HOME" \
-Des.path.conf="$CONF_DIR" \
-cp "$ES_CLASSPATH" \
org.elasticsearch.xpack.extensions.XPackExtensionCli \
"$@"
status=$?
cd - > /dev/null
exit $status

View File

@ -8,16 +8,11 @@ source "`dirname "$0"`"/../elasticsearch-env
source "`dirname "$0"`"/x-pack-env
cd "$ES_HOME" > /dev/null
"$JAVA" \
exec \
"$JAVA" \
$ES_JAVA_OPTS \
-Des.path.home="$ES_HOME" \
-Des.path.conf="$CONF_DIR" \
-cp "$ES_CLASSPATH" \
org.elasticsearch.xpack.security.authc.esnative.ESNativeRealmMigrateTool \
"$@"
status=$?
cd - > /dev/null
exit $status

View File

@ -8,16 +8,11 @@ source "`dirname "$0"`"/../elasticsearch-env
source "`dirname "$0"`"/x-pack-env
cd "$ES_HOME" > /dev/null
"$JAVA" \
exec \
"$JAVA" \
$ES_JAVA_OPTS \
-Des.path.home="$ES_HOME" \
-Des.path.conf="$CONF_DIR" \
-cp "$ES_CLASSPATH" \
org.elasticsearch.xpack.security.authc.esnative.tool.SetupPasswordTool \
"$@"
status=$?
cd - > /dev/null
exit $status

View File

@ -8,16 +8,11 @@ source "`dirname "$0"`"/../elasticsearch-env
source "`dirname "$0"`"/x-pack-env
cd "$ES_HOME" > /dev/null
"$JAVA" \
exec \
"$JAVA" \
$ES_JAVA_OPTS \
-Des.path.home="$ES_HOME" \
-Des.path.conf="$CONF_DIR" \
-cp "$ES_CLASSPATH" \
org.elasticsearch.xpack.security.crypto.tool.SystemKeyTool \
"$@"
status=$?
cd - > /dev/null
exit $status

View File

@ -8,16 +8,11 @@ source "`dirname "$0"`"/../elasticsearch-env
source "`dirname "$0"`"/x-pack-env
cd "$ES_HOME" > /dev/null
"$JAVA" \
exec \
"$JAVA" \
$ES_JAVA_OPTS \
-Des.path.home="$ES_HOME" \
-Des.path.conf="$CONF_DIR" \
-cp "$ES_CLASSPATH" \
org.elasticsearch.xpack.security.authc.file.tool.UsersTool \
"$@"
status=$?
cd - > /dev/null
exit $status