#ident	"@(#)nadmin.nfs:local/nfs/bin/nf_unshare	1.1"
#to remove resources from the automatic share list

/bin/grep -v "^[^#].*share[ 	]*-F[ 	]*nfs.*[ 	]$DIR$" /etc/dfs/dfstab >/var/tmp/$$.dfstab

if [ $? -lt 2 ]
then
	/bin/cp /var/tmp/$$.dfstab /etc/dfs/dfstab
	/bin/rm /var/tmp/$$.dfstab
	echo "$DIR has been removed from the Automatic Share List.">/var/tmp/a_share$$
else
	echo "$DIR has NOT been removed from the Automatic Share List.">/var/tmp/a_share$$
fi
echo $$
