From bbcdd177de2955a1efd2bd5e5162bc052636c2cb Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Fri, 14 Oct 2022 23:06:36 -0500 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 3488a311..c21cba34 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -1423,7 +1423,7 @@ SERVICE(){ for NTYPE in "${NODE_TYPES[@]}"; do var=${NTYPE}_HOSTS[@] for nip in "${!var}"; do - if [[ IP == *"${nip}"* ]]; then + if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then NODE_TYPE=${NTYPE}; echo "NODE_TYPE found: ${NTYPE}" break 2