Update test.sh
This commit is contained in:
5
test.sh
5
test.sh
@@ -18,7 +18,10 @@ if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remot
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1) == *"${NODEHOSTS}"* ]]; then
|
IP=$(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1)
|
||||||
|
IP=${IP//$'\n'/}; IP=$(echo $IP | sed "s/10.5.10.56//g")
|
||||||
|
echo "'${IP}'"
|
||||||
|
if [[ "${IP}" == *"${NODEHOSTS}"* ]]; then
|
||||||
echo 'is a node'
|
echo 'is a node'
|
||||||
else
|
else
|
||||||
echo 'not a node'
|
echo 'not a node'
|
||||||
|
|||||||
Reference in New Issue
Block a user