#	Unmounts NFS file resources
#	Note: written to depend on as few commands as possible.

ULIST=/tmp/ulist$$

trap 'rm -f ${ULIST}' 0 1 2 3 15

kill=yes
 
if [ ${kill} ]
then
	>${ULIST}
	/etc/mount  |
		sort -r  |
		while read fs dummy1 dev mode1 mode2 dummy2
		do
			if [ `echo ${dev} | grep ":\/"` ]
			then
				echo  "${fs} \c" >>${ULIST}
			fi
		done 
	klist=`cat ${ULIST}`
	if [ "${klist}" = "" ]
	then
		exit
	fi
	/etc/fuser -k ${klist} >/dev/null 2>&1
	for fs in ${klist}
	do
		/etc/umount ${fs}
	done 
fi
