devmatch: improve naming of devmatch config variable

Accept the old rc.conf variable if the new one is not present for
compatability.

Approved by:	imp
Differential Revision:	https://reviews.freebsd.org/D30806
This commit is contained in:
Ceri Davies 2021-06-18 13:17:30 +01:00
parent 6a836ea741
commit c43b0081fa
3 changed files with 12 additions and 4 deletions

View File

@ -45,7 +45,7 @@ ddb_config="/etc/ddb.conf" # ddb(8) config file.
devd_enable="YES" # Run devd, to trigger programs on device tree changes.
devd_flags="" # Additional flags for devd(8).
devmatch_enable="YES" # Demand load kernel modules based on device ids.
devmatch_blacklist="" # List of modules (w/o .ko) to exclude from devmatch.
devmatch_blocklist="" # List of modules (w/o .ko) to exclude from devmatch.
#kld_list="" # Kernel modules to load after local disks are mounted
kldxref_enable="YES" # Build linker.hints files with kldxref(8).
kldxref_clobber="NO" # Overwrite old linker.hints at boot.

View File

@ -59,9 +59,9 @@ devmatch_start()
# or drivers that have symbolic links that
# confuse devmatch by running it -n.
# Finally, we filter out all items in the
# devmactch_blacklist.
# devmatch_blocklist.
devctl freeze
x=$(echo ${devmatch_blacklist} | tr ' ' '#')
x=$(echo ${devmatch_blocklist:-${devmatch_blacklist}} | tr ' ' '#')
for m in ${list}; do
case "#${x}#" in
*"#${m}#"*) continue ;;

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd May 13, 2021
.Dd June 18, 2021
.Dt RC.CONF 5
.Os
.Sh NAME
@ -257,8 +257,16 @@ If set to
.Dq Li NO ,
disable auto-loading of kernel modules with
.Xr devmatch 8 .
.It Va devmatch_blocklist
.Pq Vt str
A whitespace-separated list of kernel modules to be ignored by
.Xr devmatch 8 .
.It Va devmatch_blacklist
.Pq Vt str
This variable is deprecated.
Use
.Va devmatch_blocklist
instead.
A whitespace-separated list of kernel modules to be ignored by
.Xr devmatch 8 .
.It Va kld_list