svn commit: r262384 - in stable/10: etc/defaults etc/rc.d share/man/man5

Bryan Drewery bdrewery at FreeBSD.org
Sun Feb 23 20:04:30 UTC 2014


Author: bdrewery
Date: Sun Feb 23 20:04:29 2014
New Revision: 262384
URL: http://svnweb.freebsd.org/changeset/base/262384

Log:
  MFC r261931,r261932:
  
    Allow overriding rctl.conf(5) file location for /etc/rc.d/rctl
  
  Approved by:	bapt (mentor, implicit)

Modified:
  stable/10/etc/defaults/rc.conf
  stable/10/etc/rc.d/rctl
  stable/10/share/man/man5/rc.conf.5
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/defaults/rc.conf
==============================================================================
--- stable/10/etc/defaults/rc.conf	Sun Feb 23 19:18:04 2014	(r262383)
+++ stable/10/etc/defaults/rc.conf	Sun Feb 23 20:04:29 2014	(r262384)
@@ -663,6 +663,10 @@ newsyslog_flags="-CN"	# Newsyslog flags 
 mixer_enable="YES"	# Run the sound mixer.
 opensm_enable="NO"	# Opensm(8) for infiniband devices defaults to off
 
+# 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) ##########
 ##############################################################

Modified: stable/10/etc/rc.d/rctl
==============================================================================
--- stable/10/etc/rc.d/rctl	Sun Feb 23 19:18:04 2014	(r262383)
+++ stable/10/etc/rc.d/rctl	Sun Feb 23 20:04:29 2014	(r262384)
@@ -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
 }
 

Modified: stable/10/share/man/man5/rc.conf.5
==============================================================================
--- stable/10/share/man/man5/rc.conf.5	Sun Feb 23 19:18:04 2014	(r262383)
+++ stable/10/share/man/man5/rc.conf.5	Sun Feb 23 20:04:29 2014	(r262384)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 25, 2013
+.Dd February 15, 2014
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -4416,6 +4416,26 @@ interface if desired.
 Defines the total number of seconds to wait for link to become usable,
 polled at a 1-second interval.
 The default is 30.
+.It Va rctl_enable
+.Pq Vt bool
+Set to
+.Dq Li YES
+to load
+.Xr rctl 8
+rules from the defined ruleset.
+The kernel must be built with
+.Cd "options RACCT"
+and
+.Cd "options RCTL" .
+.It Va rctl_rules
+.Pq Vt str
+Set to
+.Pa /etc/rctl.conf
+by default.
+This variables contains the
+.Xr rctl.conf 5
+ruleset to load for
+.Xr rctl 8 .
 .El
 .Sh FILES
 .Bl -tag -width ".Pa /etc/defaults/rc.conf" -compact


More information about the svn-src-stable-10 mailing list