#!/bin/sh
#
# quota        This shell script Starts Quota Services on your System.
#              Please remove all Quota related Stuff from other 
#              Startup-files.
#
# Version:      @(#) /etc/rc.d/init.d/quota 1.2 Sat Oct 1996
#
# Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
#               Modified by Joerg Mertin, <smurphy@linux.de>

# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
  start)
     # Check quotas.
     if [ -x /sbin/quotacheck ];
     then
        echo -n "Checking quotas: ";
        /sbin/quotacheck -a
        echo "Done"
     fi
     # Turn on quotas
     if [ -x /sbin/quotaon ]; 
     then
        echo "Starting quota"
        /sbin/quotaon -avug
     fi
     touch /var/lock/subsys/quota
       ;;
  stop)
     if [ -x /sbin/quotaoff ]; 
     then
        echo "Shutting down Quota services "
	/sbin/quotaoff -avug
     fi
     rm -f /var/lock/subsys/quota
	;;
  *)
	echo "Usage: quota {start|stop}"
	exit 1
esac

exit 0

