#!/bin/bash

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

/sbin/isnsc -s $1 -t -p 3205 -i 307
RET=$?
if [ $RET != 0 ]; then
	echo "iSNS Registration for iSCSI Initiator Node does not exist";
	exit 1
else
	echo "iSNS Registration for iSCSI Initiator Node exists";
	exit 0
fi
