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}