2001-06-16 07:16:14 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2002-06-13 22:14:37 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
# Enable/Check the quotas (must be after ypbind if using NIS)
|
2001-06-16 07:16:14 +00:00
|
|
|
|
|
|
|
# PROVIDE: quota
|
2009-06-01 04:55:13 +00:00
|
|
|
# REQUIRE: mountcritremote ypset
|
2002-06-13 22:14:37 +00:00
|
|
|
# BEFORE: DAEMON
|
2004-10-07 13:55:26 +00:00
|
|
|
# KEYWORD: nojail
|
2001-06-16 07:16:14 +00:00
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="quota"
|
2008-06-19 07:06:11 +00:00
|
|
|
rcvar=`set_rcvar`
|
2011-06-28 14:26:34 +00:00
|
|
|
load_rc_config $name
|
2001-06-16 07:16:14 +00:00
|
|
|
start_cmd="quota_start"
|
2007-01-20 04:24:20 +00:00
|
|
|
stop_cmd="/usr/sbin/quotaoff ${quotaoff_flags}"
|
2001-06-16 07:16:14 +00:00
|
|
|
|
|
|
|
quota_start()
|
|
|
|
{
|
2002-10-12 10:31:31 +00:00
|
|
|
if checkyesno check_quotas; then
|
2002-06-13 22:14:37 +00:00
|
|
|
echo -n 'Checking quotas:'
|
2007-01-20 04:24:20 +00:00
|
|
|
quotacheck ${quotacheck_flags}
|
2002-06-13 22:14:37 +00:00
|
|
|
echo ' done.'
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo -n 'Enabling quotas:'
|
2007-01-20 04:24:20 +00:00
|
|
|
quotaon ${quotaon_flags}
|
2002-06-13 22:14:37 +00:00
|
|
|
echo ' done.'
|
2001-06-16 07:16:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
run_rc_command "$1"
|