Allow overriding rctl.conf(5) file location for /etc/rc.d/rctl

Reviewed by:	trasz
Approved by:	bapt (mentor)
MFC after:      1 week
This commit is contained in:
bdrewery 2014-02-15 14:50:47 +00:00
parent 54cfadd9cd
commit 502860ada5
2 changed files with 6 additions and 2 deletions

View File

@ -660,6 +660,10 @@ mixer_enable="YES" # Run the sound mixer.
opensm_enable="NO" # Opensm(8) for infiniband devices defaults to off
casperd_enable="YES" # casperd(8) daemon
# rctl(8) requires kernel options RACCT and RCTL
rctl_enable="NO" # Load rctl(8) rules on boot
rctl_rules="/etc/rctl.conf" # rctl(8) ruleset. See rctl.conf(5).
##############################################################
### Jail Configuration (see rc.conf(5) manual page) ##########
##############################################################

View File

@ -15,7 +15,7 @@ stop_cmd="rctl_stop"
rctl_start()
{
if [ -f /etc/rctl.conf ]; then
if [ -f ${rctl_rules} ]; then
while read var comments
do
case ${var} in
@ -25,7 +25,7 @@ rctl_start()
rctl -a "${var}"
;;
esac
done < /etc/rctl.conf
done < ${rctl_rules}
fi
}