svn commit: r231194 - in head: etc/defaults etc/rc.d share/man/man5
Doug Barton
dougb at FreeBSD.org
Wed Feb 8 08:52:41 UTC 2012
Author: dougb
Date: Wed Feb 8 08:52:40 2012
New Revision: 231194
URL: http://svn.freebsd.org/changeset/base/231194
Log:
As it stands right now, the default devfs rulesets are only loaded as a
side effect of something else using them. If they haven't been loaded
already but you want to use them, say for configuring a jail, you're out
of luck.
So add a knob to always load the default rulesets. While I'm here document
the other devfs_ knobs in rc.conf.5.
Modified:
head/etc/defaults/rc.conf
head/etc/rc.d/devfs
head/share/man/man5/rc.conf.5
Modified: head/etc/defaults/rc.conf
==============================================================================
--- head/etc/defaults/rc.conf Wed Feb 8 08:49:30 2012 (r231193)
+++ head/etc/defaults/rc.conf Wed Feb 8 08:52:40 2012 (r231194)
@@ -648,6 +648,7 @@ devfs_rulesets="/etc/defaults/devfs.rule
devfs_system_ruleset="" # The name (NOT number) of a ruleset to apply to /dev
devfs_set_rulesets="" # A list of /mount/dev=ruleset_name settings to
# apply (must be mounted already, i.e. fstab(5))
+devfs_load_rulesets="NO" # Enable to always load the default rulesets
performance_cx_lowest="HIGH" # Online CPU idle state
performance_cpu_freq="NONE" # Online CPU frequency
economy_cx_lowest="HIGH" # Offline CPU idle state
Modified: head/etc/rc.d/devfs
==============================================================================
--- head/etc/rc.d/devfs Wed Feb 8 08:49:30 2012 (r231193)
+++ head/etc/rc.d/devfs Wed Feb 8 08:52:40 2012 (r231194)
@@ -16,7 +16,8 @@ stop_cmd=':'
devfs_start()
{
- if [ -n "$devfs_system_ruleset" -o -n "$devfs_set_rulesets" ]; then
+ if [ -n "$devfs_system_ruleset" -o -n "$devfs_set_rulesets" ] ||
+ checkyesno devfs_load_rulesets; then
devfs_init_rulesets
if [ -n "$devfs_system_ruleset" ]; then
devfs_set_ruleset $devfs_system_ruleset /dev
Modified: head/share/man/man5/rc.conf.5
==============================================================================
--- head/share/man/man5/rc.conf.5 Wed Feb 8 08:49:30 2012 (r231193)
+++ head/share/man/man5/rc.conf.5 Wed Feb 8 08:52:40 2012 (r231194)
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd December 13, 2011
+.Dd February 8, 2012
.Dt RC.CONF 5
.Os
.Sh NAME
@@ -3673,6 +3673,25 @@ is set to
these are the flags passed to the
.Xr watchdogd 8
daemon.
+.It Va devfs_rulesets
+.Pq Vt str
+List of files containing sets of rules for
+.Xr devfs 8 .
+.It Va devfs_system_ruleset
+.Pq Vt str
+Rule name(s) to apply to the system
+.Pa /dev
+itself.
+.It Va devfs_set_rulesets
+.Pq Vt str
+Pairs of already-mounted
+.Pa dev
+directories and rulesets that should be applied to them.
+For example: /mount/dev=ruleset_name
+.It Va devfs_load_rulesets
+.Pq Vt bool
+If set, always load the default rulesets listed in
+.Va devfs_rulesets .
.It Va performance_cx_lowest
.Pq Vt str
CPU idle state to use while on AC power.
@@ -4532,6 +4551,7 @@ The default is 30.
.Xr chkprintcap 8 ,
.Xr chown 8 ,
.Xr cron 8 ,
+.Xr devfs 8 ,
.Xr dhclient 8 ,
.Xr ftpd 8 ,
.Xr geli 8 ,
More information about the svn-src-all
mailing list