Update nodemgmt-scripts.sh

This commit is contained in:
2020-03-21 21:50:51 -05:00
parent 8fc939cae4
commit 2a287771f7

View File

@@ -1285,7 +1285,8 @@ SERVICE(){
var=${NTYPE}_HOSTS[@]
echo "$NTYPE"
for nip in "${!var}"; do
echo -en "$nip = "
IP=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1)
echo -en "($IP) $nip = "
if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then
NODE_TYPE=${NTYPE};
echo "yes"