This is an automated email from the ASF dual-hosted git repository.
ctubbsii 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 37ae92fa11 Avoid calling external true/false commands
37ae92fa11 is described below
commit 37ae92fa11e6c6b6f17f90a4607e9134d46a6112
Author: Christopher Tubbs <[email protected]>
AuthorDate: Thu Apr 3 20:12:44 2025 -0400
Avoid calling external true/false commands
Trivial fix in bash scripts to avoid calling external true/false
commands from the path (like /usr/bin/true or /usr/bin/false) when
checking if the `$all_flag` has been set.
---
assemble/bin/accumulo-service | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/assemble/bin/accumulo-service b/assemble/bin/accumulo-service
index 2bc754c212..20c3c4e6a1 100755
--- a/assemble/bin/accumulo-service
+++ b/assemble/bin/accumulo-service
@@ -159,7 +159,7 @@ function stop_service() {
local service_type=$1
local service_name=$2
local all_flag=$3
- if $all_flag; then
+ if [[ $all_flag == 'true' ]]; then
find_processes "$service_type"
for process in "${RUNNING_PROCESSES[@]}"; do
local pid_file="${ACCUMULO_PID_DIR}/accumulo-${process}.pid"
@@ -188,7 +188,7 @@ function kill_service() {
local service_type=$1
local service_name=$2
local all_flag=$3
- if $all_flag; then
+ if [[ $all_flag == 'true' ]]; then
find_processes "$service_type"
for process in "${RUNNING_PROCESSES[@]}"; do
local pid_file="${ACCUMULO_PID_DIR}/accumulo-${process}.pid"