This is an automated email from the ASF dual-hosted git repository.

ddanielr pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/2.1 by this push:
     new 5c91c5a48e Create all vars before sourcing accumulo-env.sh (#5513)
5c91c5a48e is described below

commit 5c91c5a48e717028ca6a513c24bcdfcec122073d
Author: Daniel Roberts <ddani...@gmail.com>
AuthorDate: Mon Apr 28 14:08:42 2025 -0400

    Create all vars before sourcing accumulo-env.sh (#5513)
    
    Moves the sourcing of accumulo-env.sh to after all of the variables
    are defined for accumulo-service.
    
    This allows for better handling of specific processes and actions in
    accumulo-env.sh
---
 assemble/bin/accumulo-service | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/assemble/bin/accumulo-service b/assemble/bin/accumulo-service
index 888afe532f..e21e977286 100755
--- a/assemble/bin/accumulo-service
+++ b/assemble/bin/accumulo-service
@@ -268,16 +268,6 @@ function main() {
   group=$(get_group "$@")
   export ACCUMULO_RESOURCE_GROUP="$group"
 
-  if [[ -f "${conf}/accumulo-env.sh" ]]; then
-    #shellcheck source=../conf/accumulo-env.sh
-    source "${conf}/accumulo-env.sh"
-  fi
-  ACCUMULO_LOG_DIR="${ACCUMULO_LOG_DIR:-${basedir}/logs}"
-  ACCUMULO_PID_DIR="${ACCUMULO_PID_DIR:-${basedir}/run}"
-
-  mkdir -p "$ACCUMULO_LOG_DIR" 2>/dev/null
-  mkdir -p "$ACCUMULO_PID_DIR" 2>/dev/null
-
   HOST="$(hostname)"
   if [[ -z $HOST ]]; then
     HOST=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut 
-f1 -d'/')
@@ -294,6 +284,16 @@ function main() {
     service_type="manager"
   fi
 
+  if [[ -f "${conf}/accumulo-env.sh" ]]; then
+    #shellcheck source=../conf/accumulo-env.sh
+    source "${conf}/accumulo-env.sh"
+  fi
+  ACCUMULO_LOG_DIR="${ACCUMULO_LOG_DIR:-${basedir}/logs}"
+  ACCUMULO_PID_DIR="${ACCUMULO_PID_DIR:-${basedir}/run}"
+
+  mkdir -p "$ACCUMULO_LOG_DIR" 2>/dev/null
+  mkdir -p "$ACCUMULO_PID_DIR" 2>/dev/null
+
   # Check and see if accumulo-cluster is calling this script
   if [[ -z $ACCUMULO_CLUSTER_ARG ]]; then
     # The rest of the arguments are from a user

Reply via email to