From 8fc939cae47f236ed9c977c630377706ac912e2b Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 21 Mar 2020 21:49:52 -0500 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index e6bb8233..1fe408fa 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -1283,13 +1283,19 @@ SERVICE(){ #var=NC_HOSTS[@] for NTYPE in "${NODE_TYPES[@]}"; do var=${NTYPE}_HOSTS[@] + echo "$NTYPE" for nip in "${!var}"; do + echo -en "$nip = " if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then NODE_TYPE=${NTYPE}; + echo "yes" + else + echo "no" fi done done echo "NODE TYPE: ${NTYPE}" + exit 0; if [ "$NODE_TYPE" = "NC" ]; then NT_HOSTS=NC_HOSTS[@] NT_HOST=NC_HOSTS[0]