Stop exporting HOSTNAME from scripts

Today we explicitly export the HOSTNAME variable from scripts. This is
probably a relic from the days when the scripts were not run on bash but
instead assume a POSIX-compliant shell only where HOSTNAME is not
guaranteed to exist. Yet, bash guarantees that HOSTNAME is set so we do
not need to set it in scripts. This commit removes this legacy.

Relates #25807
This commit is contained in:
Jason Tedor 2017-07-20 22:27:47 +09:00 committed by GitHub
parent 67a4288c9a
commit 3042b5dc7d
4 changed files with 0 additions and 20 deletions

View File

@ -102,11 +102,6 @@ if [ $? -ne 0 ]; then
exit 1
fi
# full hostname passed through cut for portability on systems that do not support hostname -s
# export on separate line for shells that do not support combining definition and export
HOSTNAME=`hostname | cut -d. -f1`
export HOSTNAME
# manual parsing to find out, if process should be detached
daemonized=`echo $* | egrep -- '(^-d |-d$| -d |--daemonize$|--daemonize )'`
if [ -z "$daemonized" ] ; then

View File

@ -71,11 +71,6 @@ if [ ! -x "$JAVA" ]; then
exit 1
fi
# full hostname passed through cut for portability on systems that do not support hostname -s
# export on separate line for shells that do not support combining definition and export
HOSTNAME=`hostname | cut -d. -f1`
export HOSTNAME
declare -a args=("$@")
path_props=(-Des.path.home="$ES_HOME")

View File

@ -71,11 +71,6 @@ if [ ! -x "$JAVA" ]; then
exit 1
fi
# full hostname passed through cut for portability on systems that do not support hostname -s
# export on separate line for shells that do not support combining definition and export
HOSTNAME=`hostname | cut -d. -f1`
export HOSTNAME
declare -a args=("$@")
path_props=(-Des.path.home="$ES_HOME")

View File

@ -71,11 +71,6 @@ if [ ! -x "$JAVA" ]; then
exit 1
fi
# full hostname passed through cut for portability on systems that do not support hostname -s
# export on separate line for shells that do not support combining definition and export
HOSTNAME=`hostname | cut -d. -f1`
export HOSTNAME
declare -a args=("$@")
if [ -e "$CONF_DIR" ]; then