xref: /freebsd/libexec/rc/rc.d/quota (revision 0696600c41600d80bcd993bfd8e675d0ae6951fe)
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5 
6 # Enable/Check the quotas (must be after ypbind if using NIS)
7 
8 # PROVIDE: quota
9 # REQUIRE: mountcritremote ypset
10 # BEFORE: DAEMON
11 # KEYWORD: nojail
12 
13 . /etc/rc.subr
14 
15 name="quota"
16 desc="Enable/check the quotas"
17 rcvar="quota_enable"
18 load_rc_config $name
19 start_cmd="quota_start"
20 stop_cmd="/usr/sbin/quotaoff ${quotaoff_flags}"
21 
22 quota_start()
23 {
24 	if checkyesno check_quotas; then
25 		echo -n 'Checking quotas:'
26 		quotacheck ${quotacheck_flags}
27 		echo ' done.'
28 	fi
29 
30 	echo -n 'Enabling quotas:'
31 	quotaon ${quotaon_flags}
32 	echo ' done.'
33 }
34 
35 run_rc_command "$1"
36