From ce243236027f0697a5dfeca9debcdb90a4d5d81d Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 6 Dec 2023 21:48:59 -0600 Subject: [PATCH] Update status.inc --- inc/status.inc | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/inc/status.inc b/inc/status.inc index d78b647a..124e0aba 100755 --- a/inc/status.inc +++ b/inc/status.inc @@ -7,15 +7,12 @@ STATUS(){ [ "${ST_ACTION}" == "sync" ] && ST_ACTION=repl declare -i cw; declare -i spc1; declare -i c - ntypesel="" - for NTYPE in "${NM_NODE_TYPES[@]}"; do - if [ "${ST_ACTION^^}" == "${NTYPE}" ]; then - ntypesel=${NTYPE} - ST_ACTION=${2} - break - fi - done - [ "${ntypesel}" != "" ] && ntypesel=(${ntypesel}) || ntypesel=(${NM_NODE_TYPES[@]}) + if [ "${NM_NODETYPES[${ST_ACTION^^}]}" != "" ]; then + ntypesel=(${ST_ACTION^^}) + ST_ACTION=${2} + else + ntypesel=(${NM_NODE_TYPES[@]}) + fi ############################ ## REPLICATION CHECK SETUP