#!/bin/bash

RUNLEVEL=S
NEEDS="+local_fs"

. /etc/init.d/smgl_init

start() {

  # Check quota and then turn quota on. 
  echo "Checking quotas. This may take some time." 
  /usr/sbin/quotacheck -avug 
  evaluate_retval

  echo "Turning on quota..." 
  /usr/sbin/quotaon -avug 
  evaluate_retval

}


stop() {

  echo "Turning off quota..." 
  /usr/sbin/quotaoff -avug 
  evaluate_retval

}


case "$1" in
  start)  start                           ;;
   stop)  stop                            ;;
      *)  echo  "Usage: $0 {start|stop}"  ;;
esac
