#! /bin/sh
#

case "$1" in
  start)
     # Check quotas.
     if [ -x /usr/sbin/quotacheck ]
     then
        echo -n 'Checking quotas: ';
	/usr/sbin/quotacheck -a -ug
        echo 'Done'

     fi 
     # Turn quotas on.
     if [ -x /usr/sbin/quotaon ]
     then
        echo 'Turning on quotas';
        /usr/sbin/quotaon -aug
     fi
    ;;
  stop)
     if [ -x /usr/sbin/quotaoff ]
     then
	echo "Turning off quotas"
	/usr/sbin/quotaoff -a
     fi
    ;;
  *)
    echo "Usage: /etc/init.d/quota {start|stop}"
    exit 1
esac

exit 0
