#	ATT:#ident	"initpkg:init.d/adv	1.3"	
	
#ident	"@(#)initpkg/init.d:adv	25.1"


USAGE="Usage: /etc/init.d/adv {start | stop}"
if [ $# -lt 1 ]
then
	echo "$USAGE"
	exit 	exit 1
fi
case $1 in
'start')

#	advertise everything in /etc/rstab
 
 	if [ -f /etc/rstab ]
 	then
 		sh /etc/rstab
 	fi
	;;

'stop')
#		the following unadvertises everything currently advertised

	/bin/cat /etc/advtab |
		while read resource junk
		do 
			/usr/bin/unadv ${resource}
		done
	;;
*)
	echo "$USAGE"
	exit 1
	;;
esac
