rc.d: rename vfs_accounting to vfs_quota
[dragonfly.git] / etc / rc.d / vfs_quota
CommitLineData
9be2bba0
FT
1#!/bin/sh
2
7f180e19 3# PROVIDE: vfs_quota
9be2bba0
FT
4# REQUIRE: mountcritlocal
5# BEFORE: LOGIN
6
7. /etc/rc.subr
8
7f180e19 9name="vfs_quota"
9be2bba0 10rcvar=`set_rcvar`
7f180e19 11start_cmd="vq_start"
9be2bba0 12
7f180e19 13vq_start()
9be2bba0 14{
7f180e19
FT
15 if checkyesno vfs_quota_enable; then
16 # For each dir in $vfs_quota_sync, run vquota sync
9be2bba0 17 #
7f180e19 18 case ${vfs_quota_sync} in
9be2bba0
FT
19 [Nn][Oo] | '')
20 ;;
21 *)
22 echo -n 'Synchronizing VFS counters: '
7f180e19 23 for dir in ${vfs_quota_sync}; do
9be2bba0
FT
24 echo -n "${dir} "
25 if [ -d "${dir}" ]; then
26 /sbin/vquota sync ${dir}
27 fi
28 done
29 echo '.'
30 ;;
31 esac
32 fi
33}
34
35load_rc_config $name
36run_rc_command "$1"