19c600e7dSMatthew Dillon#!/bin/sh 29c600e7dSMatthew Dillon# 39c600e7dSMatthew Dillon# $FreeBSD: src/etc/rc.d/quota,v 1.3 2002/10/12 10:31:31 schweikh Exp $ 49c600e7dSMatthew Dillon# 59c600e7dSMatthew Dillon 69c600e7dSMatthew Dillon# Enable/Check the quotas (must be after ypbind if using NIS) 79c600e7dSMatthew Dillon# 89c600e7dSMatthew Dillon 99c600e7dSMatthew Dillon# PROVIDE: quota 10*ce083385SAaron LI# REQUIRE: mountcritremote ypset 119c600e7dSMatthew Dillon# BEFORE: DAEMON 129c600e7dSMatthew Dillon 139c600e7dSMatthew Dillon. /etc/rc.subr 149c600e7dSMatthew Dillon 159c600e7dSMatthew Dillonname="quota" 169c600e7dSMatthew Dillonrcvar="enable_quotas" 179c600e7dSMatthew Dillonstart_cmd="quota_start" 189c600e7dSMatthew Dillonstop_cmd="/usr/sbin/quotaoff -a" 199c600e7dSMatthew Dillon 209c600e7dSMatthew Dillonquota_start() 219c600e7dSMatthew Dillon{ 229c600e7dSMatthew Dillon if checkyesno check_quotas; then 239c600e7dSMatthew Dillon echo -n 'Checking quotas:' 249c600e7dSMatthew Dillon quotacheck -a 259c600e7dSMatthew Dillon echo ' done.' 269c600e7dSMatthew Dillon fi 279c600e7dSMatthew Dillon 289c600e7dSMatthew Dillon echo -n 'Enabling quotas:' 299c600e7dSMatthew Dillon quotaon -a 309c600e7dSMatthew Dillon echo ' done.' 319c600e7dSMatthew Dillon} 329c600e7dSMatthew Dillon 339c600e7dSMatthew Dillonload_rc_config $name 349c600e7dSMatthew Dillonrun_rc_command "$1" 35