From 88c3793d030d94af2741b51846a19fa4ccb6c4f5 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Tue, 12 Dec 2023 08:06:56 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 139126bf..bdc82d2c 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -588,24 +588,30 @@ RUN_COMMAND(){ } DOWNLIST(){ - if [ "${1}" = "report" ]; then - unset idsCL idsBG idsST - idsCL=('') - idsBG=('') - idsST=('') - fi declare -i cw; declare -i spc1; declare -i c DOWN_LIST=`find ${NM_FOLDER} -name "*.down"` IFS=$'\n' - read -rd '' -a DOWNLIST <<<"${DOWN_LIST}" + read -rd '' -a DOWN_LIST <<<"${DOWN_LIST}" unset IFS + # if [ "${1}" = "report" ]; then + # DOWNLIST=${DOWN_LIST} + # unset idsCL idsBG idsST + # idsCL=('') + # idsBG=('') + # idsST=('') + # else + DOWNLIST=() + for dli in "${DOWNLIST[@]}"; do + [ ! -f ${dli/disable/down} ] && DOWNLIST+=(${dli}) + done + # fi if [ -z ${ACTION} ] || [ "${ACTION}" = "gui" ]; then DIVIDER true fi echo - if [ "${DOWN_LIST}" == "" ]; then + if [ "${DOWNLIST}" == "" ]; then echo -e "${idsCL[LightCyan]}Nothing is down. Hooray for you!!${idsCL[Default]}" echo -en "\nWanna see something great for being so awesome? (y/N) "