From bf485b07dd5d9c61e12494ff1407e12be40351d6 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 1 Dec 2024 18:42:00 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index bc50186c..049f83bb 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -793,26 +793,26 @@ RUN_COMMAND(){ fi echo "NODETYPE= '${nodetype}'" - echo "RUNCMD= ${RUNCMD}" + echo "RUNCMD= '${RUNCMD}'" - # for NTYPE in "${NTS[@]}"; do - # echo -e "${idsST[Bold]}"; DIVIDER - # echo -e "${idsCL[Yellow]} ${NM_NODETYPES[$NTYPE]}-Nodes to run command { \`${RUNCMD}\` }${idsCL[Default]}" - # DIVIDER; echo -e "${idsST[Reset]}" - # - # for nip in "${!NT_HOSTS}"; do - # if [[ ${RUN_NODE_IP} == *"${nip}"* ]]; then NCMD=''; LH='- localhost' - # else NCMD="ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${nip}"; LH='' - # fi - # echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]}[${nip}]${idsST[Reset]}${idsCL[LightCyan]} ${idsCL[LightYellow]}${LH}${idsCL[Default]}" - # DIVIDER false green - # echo "Running command: ${NCMD} ${RUNCMD}" - # #${NCMD} "${RUNCMD}" - # DIVIDER false green - # echo - # done - # echo - # done + for NTYPE in "${NTS[@]}"; do + echo -e "${idsST[Bold]}"; DIVIDER + echo -e "${idsCL[Yellow]} ${NM_NODETYPES[$NTYPE]}-Nodes to run command { \`${RUNCMD}\` }${idsCL[Default]}" + DIVIDER; echo -e "${idsST[Reset]}" + + for nip in "${!NT_HOSTS}"; do + if [[ ${RUN_NODE_IP} == *"${nip}"* ]]; then NCMD=''; LH='- localhost' + else NCMD="ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${nip}"; LH='' + fi + echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]}[${nip}]${idsST[Reset]}${idsCL[LightCyan]} ${idsCL[LightYellow]}${LH}${idsCL[Default]}" + DIVIDER false green + echo "Running command: ${NCMD} ${RUNCMD}" + #${NCMD} "${RUNCMD}" + DIVIDER false green + echo + done + echo + done } DOWNLIST(){