]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - etc/rc.d/quota
Merge branch 'releng/11.3' into releng-CDN/11.3
[FreeBSD/FreeBSD.git] / etc / rc.d / quota
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"