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