From 2d9e0748579cdd34d39272e2d4c7c8eccf8d5e2d Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 1 Dec 2024 18:49:35 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index f7aa8dd9..97e08a56 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -778,7 +778,6 @@ RUN_COMMAND(){ esac shift done - echo "NODETYPE1= '${nodetype}'" if [ "${nodetype}" == "ALL" ] || [ -z ${nodetype+x} ]; then nodetype=ALL NT_HOSTS=ALL_HOSTS[@] @@ -792,7 +791,10 @@ RUN_COMMAND(){ exit 1 fi fi - + if [ -z ${RUNCMD+x} ]; then + echo -e "${idsCL[Red]}No command specified to run. (Use -cmd "{command}")${idsCL[Default]}" + exit 1 + fi for NTYPE in "${NTS[@]}"; do echo -e "${idsST[Bold]}"; DIVIDER echo -e "${idsCL[Yellow]} ${NM_NODETYPES[$NTYPE]}-Nodes to run command { \`${RUNCMD}\` }${idsCL[Default]}"