Page MenuHomeFreeBSD

D40886.diff
No OneTemporary

D40886.diff

diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist
--- a/etc/mtree/BSD.root.dist
+++ b/etc/mtree/BSD.root.dist
@@ -96,6 +96,8 @@
..
ssl
..
+ sysctl.conf.d
+ ..
syslog.d
..
zfs
diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr
--- a/libexec/rc/rc.subr
+++ b/libexec/rc/rc.subr
@@ -1970,6 +1970,9 @@
return 1
else
info "$1 kernel module loaded."
+ if [ -f "/etc/sysctl.conf.d/$1.conf" ]; then
+ sysctl -f "/etc/sysctl.conf.d/$1.conf"
+ fi
fi
else
debug "load_kld: $1 kernel module already loaded."
diff --git a/share/man/man5/sysctl.conf.5 b/share/man/man5/sysctl.conf.5
--- a/share/man/man5/sysctl.conf.5
+++ b/share/man/man5/sysctl.conf.5
@@ -51,6 +51,13 @@
as seen in the
.Sx EXAMPLES
section, below.
+.Pp
+For kernel modules loaded via
+.Xr rc.subr 8
+system ,
+additional module-specific settings can be applied
+by adding a file in the same format named
+.Pf /etc/sysctl.d/<module name>.conf .
.Sh FILES
.Bl -tag -width /etc/rc.d/sysctl_lastload -compact
.It Pa /etc/rc.d/sysctl
@@ -69,6 +76,9 @@
.It Pa /etc/sysctl.conf.local
Machine-specific settings for sites with a common
.Pa /etc/sysctl.conf .
+.It Pa /etc/sysctl.conf.d
+Module specific settings for kernel modules loaded via
+.Xr rc.subr 8 .
.El
.Sh EXAMPLES
To turn off logging of programs that exit due to fatal signals you may use

File Metadata

Mime Type
text/plain
Expires
Wed, Oct 2, 7:24 PM (20 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13383907
Default Alt Text
D40886.diff (1 KB)

Event Timeline