From 7f180e19a79f1a1dca9f768c1f0600518fff0aaa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Tigeot?= Date: Thu, 12 Jul 2012 22:19:04 +0200 Subject: [PATCH] rc.d: rename vfs_accounting to vfs_quota Rename the rc.d vfs_accounting_* variables to vfs_quota_* as well --- Makefile_upgrade.inc | 1 + etc/defaults/rc.conf | 6 +++--- etc/rc.d/Makefile | 2 +- etc/rc.d/vfs_accounting | 36 ------------------------------------ etc/rc.d/vfs_quota | 36 ++++++++++++++++++++++++++++++++++++ share/man/man5/rc.conf.5 | 6 +++--- 6 files changed, 44 insertions(+), 43 deletions(-) delete mode 100644 etc/rc.d/vfs_accounting create mode 100644 etc/rc.d/vfs_quota diff --git a/Makefile_upgrade.inc b/Makefile_upgrade.inc index f6b27a5..4646c69 100644 --- a/Makefile_upgrade.inc +++ b/Makefile_upgrade.inc @@ -2029,6 +2029,7 @@ TO_REMOVE+=/usr/share/man/man3/puffs_fuse_unlink.3.gz TO_REMOVE+=/usr/include/netgraph7/ng_tty.h TO_REMOVE+=/etc/pam.d/gdm TO_REMOVE+=/etc/pam.d/kde +TO_REMOVE+=/etc/rc.d/vfs_accounting .if ${MACHINE_ARCH} == "x86_64" TO_REMOVE+=/usr/libdata/stallion/2681.sys diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 5bb6715..af6aca5 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -426,11 +426,11 @@ jail_sysvipc_allow="NO" # Allow SystemV IPC use from within a jail #jail_example_flags="-l -U root" # flags for jail(8) ############################################################## -### VFS accounting options ################################## +### VFS quota options ####################################### ############################################################## -vfs_accounting_enable="NO" # Set to YES to enable handling of these vfs accounting options -vfs_accounting_sync="" # Space separated list of mount points or "NO" +vfs_quota_enable="NO" # Set to YES to enable handling of these vfs quota options +vfs_quota_sync="" # Space separated list of mount points or "NO" ############################################################## ### VKernel options ######################################### diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index ca14e01..b8fdb06 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -22,7 +22,7 @@ FILES= DAEMON LOGIN NETWORKING SERVERS abi accounting addswap adjkerntz \ routing rpcbind rtadvd rtsold rwho sysdb savecore sdpd securelevel \ sendmail sensorsd serial sppp sshd statd swap1 syscons sysctl syslogd \ timed ttys udevd udevd_early usbd \ - varsym vfs_accounting vinum virecover vkernel vknetd \ + varsym vfs_quota vinum virecover vkernel vknetd \ watchdogd wpa_supplicant \ ypbind yppasswdd ypserv ypset ypupdated ypxfrd diff --git a/etc/rc.d/vfs_accounting b/etc/rc.d/vfs_accounting deleted file mode 100644 index 58436aa..0000000 --- a/etc/rc.d/vfs_accounting +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -# PROVIDE: vfs_accounting -# REQUIRE: mountcritlocal -# BEFORE: LOGIN - -. /etc/rc.subr - -name="vfs_accounting" -rcvar=`set_rcvar` -start_cmd="vas_start" - -vas_start() -{ - if checkyesno vfs_accounting_enable; then - # For each dir in $vfs_accounting_sync, run vquota sync - # - case ${vfs_accounting_sync} in - [Nn][Oo] | '') - ;; - *) - echo -n 'Synchronizing VFS counters: ' - for dir in ${vfs_accounting_sync}; do - echo -n "${dir} " - if [ -d "${dir}" ]; then - /sbin/vquota sync ${dir} - fi - done - echo '.' - ;; - esac - fi -} - -load_rc_config $name -run_rc_command "$1" diff --git a/etc/rc.d/vfs_quota b/etc/rc.d/vfs_quota new file mode 100644 index 0000000..2f31a9a --- /dev/null +++ b/etc/rc.d/vfs_quota @@ -0,0 +1,36 @@ +#!/bin/sh + +# PROVIDE: vfs_quota +# REQUIRE: mountcritlocal +# BEFORE: LOGIN + +. /etc/rc.subr + +name="vfs_quota" +rcvar=`set_rcvar` +start_cmd="vq_start" + +vq_start() +{ + if checkyesno vfs_quota_enable; then + # For each dir in $vfs_quota_sync, run vquota sync + # + case ${vfs_quota_sync} in + [Nn][Oo] | '') + ;; + *) + echo -n 'Synchronizing VFS counters: ' + for dir in ${vfs_quota_sync}; do + echo -n "${dir} " + if [ -d "${dir}" ]; then + /sbin/vquota sync ${dir} + fi + done + echo '.' + ;; + esac + fi +} + +load_rc_config $name +run_rc_command "$1" diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 0ce8d24..7678e7d 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -2594,12 +2594,12 @@ has not completed within the specified time (in seconds). If set to .Dq Li YES , the udevd daemon will be started on boot. -.It Va vfs_accounting_enable +.It Va vfs_quota_enable .Pq Vt bool If set to .Dq Li YES , -vfs accounting rc.d scripts will be run on boot. -.It Va vfs_accounting_sync +vfs quota rc.d scripts will be run on boot. +.It Va vfs_quota_sync .Pq Vt str List of mount points whose counters are to be synchronized with on-disk usage during system startup. See also -- 1.7.7.2