Commit fb3316f1 authored by Bruno Ribas's avatar Bruno Ribas

020-tunnel-sdi Fix way to get host IP, now asks for DNS

It was necessary to use a bind style file to determine which IP we should
use to check NETSTAT table, but if we don't have bind files in hand, we
cannot set all beautifull lines as bind, so we just ask DNS what is the IP
for that NAME.
Signed-off-by: default avatarBruno Ribas <ribas@c3sl.ufpr.br>
parent ae036027
......@@ -2,7 +2,7 @@
function getcolumn()
{
IP=$(awk '{print $3}' <<< $HOSTLINE)
IP=$(host $HOSTID|head -1|awk '{print $NF}')
STATUS=$((grep -q "$IP:22" <<< $NETSTAT && echo ONLINE)||echo OFFLINE)
VERSIONLINE=$(grep VERSION $DATA|tail -1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment