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
|
2002-06-13 22:14:37 +00:00
|
|
|
# REQUIRE: mountcritremote
|
|
|
|
# BEFORE: DAEMON
|
|
|
|
# KEYWORD: FreeBSD
|
2001-06-16 07:16:14 +00:00
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="quota"
|
2002-06-13 22:14:37 +00:00
|
|
|
rcvar="enable_quotas"
|
2001-06-16 07:16:14 +00:00
|
|
|
start_cmd="quota_start"
|
|
|
|
stop_cmd="/usr/sbin/quotaoff -a"
|
|
|
|
|
|
|
|
quota_start()
|
|
|
|
{
|
2002-06-13 22:14:37 +00:00
|
|
|
if checkyesno check_quotas ; then
|
|
|
|
echo -n 'Checking quotas:'
|
|
|
|
quotacheck -a
|
|
|
|
echo ' done.'
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo -n 'Enabling quotas:'
|
|
|
|
quotaon -a
|
|
|
|
echo ' done.'
|
2001-06-16 07:16:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|