Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
[dragonfly.git] / etc / rc.d / quota
CommitLineData
9c600e7d
MD
1#!/bin/sh
2#
3# $FreeBSD: src/etc/rc.d/quota,v 1.3 2002/10/12 10:31:31 schweikh Exp $
696a5717 4# $DragonFly: src/etc/rc.d/quota,v 1.3 2005/11/19 21:47:32 swildner Exp $
9c600e7d
MD
5#
6
7# Enable/Check the quotas (must be after ypbind if using NIS)
8#
9
10# PROVIDE: quota
11# REQUIRE: mountcritremote
12# BEFORE: DAEMON
9c600e7d
MD
13
14. /etc/rc.subr
15
16name="quota"
17rcvar="enable_quotas"
18start_cmd="quota_start"
19stop_cmd="/usr/sbin/quotaoff -a"
20
21quota_start()
22{
23 if checkyesno check_quotas; then
24 echo -n 'Checking quotas:'
25 quotacheck -a
26 echo ' done.'
27 fi
28
29 echo -n 'Enabling quotas:'
30 quotaon -a
31 echo ' done.'
32}
33
34load_rc_config $name
35run_rc_command "$1"