From 449f1d60d01b83dda1fa8a9bd6d9b643f8441153 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Fri, 6 Dec 2024 22:21:08 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 6a449889..07839ae9 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -801,16 +801,17 @@ RUN_COMMAND(){ DIVIDER; echo -e "${idsST[Reset]}" NT_HOSTS=${NTYPE}_HOSTS[@] 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 if [ ! -f /tmp/nmg.run.${nip} ]; then - if [[ ${RUN_NODE_IP} == *"${nip}"* ]]; then - NCMD='' - LH='- localhost' - else - NCMD="ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${nip}" - LH='' - fi + # echo "Running command: ${NCMD} ${RUNCMD}" ${NCMD} "${RUNCMD}" touch /tmp/nmg.run.${nip}