#!/bin/bash

if [ ! $1 ]; then
	echo "IP Address of iSNS Server not provided"
        exit 1
fi

/sbin/isnsc -s $1 -t -p 3205 -i 311
RET=$?
if [ $RET != 0 ]; then
	echo "Unable to retrieve iSNS Portal Information from $1"
	exit 1
fi

cat /var/spool/isns/network_portals-$1
exit 0
