#!/usr/bin/sh
#ident	"@(#)nadmin.nfs:remote/nfs/bin/auto_mod	1.1.5.2"
#ident  "$Header: auto_mod 2.0 91/07/12 $"

# if the new mount point has been changed, then check to see if it is already
# being used as a mntpoint in the vfstab

if [ "$AMNT" != "$NMNT" ]
then
	/usr/bin/egrep "[ 	]+$NMNT[	 ]+" /etc/vfstab  1>/dev/null
	if [ $? -eq 0 ]
	then
		echo "$NMNT already a mountpoint. Automatic mounting not modified." >>/var/tmp/nfs_$$
		echo $$
		exit
	fi
fi
/usr/bin/egrep -v "^.*[ 	]+-[ 	]+$NMNT[ 	]+nfs[ 	]+-[ 	]+yes" /etc/vfstab > /var/tmp/vfstab$$
echo "$SRV:$RPATH\t-\t\t$NMNT\tnfs\t-\tyes\t$ACC$SUID$RMNT$RTRY$MTRIES$TIMEO$SEC" >>/var/tmp/vfstab$$
$TFADMIN /usr/bin/cp /var/tmp/vfstab$$ /etc/vfstab
/usr/bin/rm /var/tmp/vfstab$$
echo "Mounting of $SRV:$RPATH has been successfully modified." >>/var/tmp/nfs_$$
echo $$
