#! /sbin/sh
#Tag 0x00000f00

# Start or stop the quotas subsystem. This should be done immediately after
# the local file systems (EFS) are mounted.
# "$Revision: 1.5 $"

# Ideally we should run quotacheck(1M) when the file system has been 
# mounted and quotas enabled. But since this might take up some time
# we provide a option /etc/config/quotacheck which will determine
# whether to run quotacheck(1M) during mount time or not.
#
# "$Revision: 1.5 $"


if /sbin/chkconfig verbose ; then
	VERBOSE=-v
else
	VERBOSE=
fi

case "$1" in
  'start')
	if /sbin/chkconfig quotas ; then
		/usr/etc/quotaon ${VERBOSE} -a
		if /sbin/chkconfig quotacheck ; then
			/usr/etc/quotacheck ${VERBOSE} -a
		fi
	fi
	;;

  'stop')
	/usr/etc/quotaoff ${VERBOSE} -a
	;;

  *)
	echo "usage: $0 {start|stop}"
	;;
esac
