17f180e19SFrançois Tigeot#!/bin/sh 27f180e19SFrançois Tigeot 37f180e19SFrançois Tigeot# PROVIDE: vfs_quota 4*ce083385SAaron LI# REQUIRE: FILESYSTEMS 57f180e19SFrançois Tigeot# BEFORE: LOGIN 67f180e19SFrançois Tigeot 77f180e19SFrançois Tigeot. /etc/rc.subr 87f180e19SFrançois Tigeot 97f180e19SFrançois Tigeotname="vfs_quota" 107f180e19SFrançois Tigeotrcvar=`set_rcvar` 117f180e19SFrançois Tigeotstart_cmd="vq_start" 127f180e19SFrançois Tigeot 137f180e19SFrançois Tigeotvq_start() 147f180e19SFrançois Tigeot{ 157f180e19SFrançois Tigeot if checkyesno vfs_quota_enable; then 167f180e19SFrançois Tigeot # For each dir in $vfs_quota_sync, run vquota sync 177f180e19SFrançois Tigeot # 187f180e19SFrançois Tigeot case ${vfs_quota_sync} in 197f180e19SFrançois Tigeot [Nn][Oo] | '') 207f180e19SFrançois Tigeot ;; 217f180e19SFrançois Tigeot *) 227f180e19SFrançois Tigeot echo -n 'Synchronizing VFS counters: ' 237f180e19SFrançois Tigeot for dir in ${vfs_quota_sync}; do 247f180e19SFrançois Tigeot echo -n "${dir} " 257f180e19SFrançois Tigeot if [ -d "${dir}" ]; then 267f180e19SFrançois Tigeot /sbin/vquota sync ${dir} 277f180e19SFrançois Tigeot fi 287f180e19SFrançois Tigeot done 297f180e19SFrançois Tigeot echo '.' 307f180e19SFrançois Tigeot ;; 317f180e19SFrançois Tigeot esac 327f180e19SFrançois Tigeot fi 337f180e19SFrançois Tigeot} 347f180e19SFrançois Tigeot 357f180e19SFrançois Tigeotload_rc_config $name 367f180e19SFrançois Tigeotrun_rc_command "$1" 37