From fefd2677fb7122997da835b7be883a4edaf352af Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Wed, 16 Jun 2021 14:26:26 -0400 Subject: [PATCH] Only include so-common if available. It only is used for requiring root, but since this script is needed before common is installed, we can safely assume that it's being run as root already (during the install) --- salt/common/tools/sbin/so-elastic-auth | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/salt/common/tools/sbin/so-elastic-auth b/salt/common/tools/sbin/so-elastic-auth index 9e2843b5c..f6c19d76f 100644 --- a/salt/common/tools/sbin/so-elastic-auth +++ b/salt/common/tools/sbin/so-elastic-auth @@ -15,7 +15,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -. /usr/sbin/so-common 2> /dev/null +if [ -f "/usr/sbin/so-common" ]; then + . /usr/sbin/so-common +fi ES_AUTH_PILLAR=${ELASTIC_AUTH_PILLAR:-/opt/so/saltstack/local/pillar/elasticsearch/auth.sls} ES_USERS_FILE=${ELASTIC_USERS_FILE:-/opt/so/saltstack/local/salt/elasticsearch/files/users}