devmatch: Allow devmatch_blocklist to be set in kenv too
Add in all the variables set in the kenv variable devmatch_blocklist too. This allows blocking autoloading from the boot loader. Sponsored by: Netflix Reviewed by: 0mp Differential Revision: https://reviews.freebsd.org/D32171
This commit is contained in:
parent
a8837c77ef
commit
a8935083b5
@ -64,7 +64,7 @@ devmatch_start()
|
|||||||
# names with .ko
|
# names with .ko
|
||||||
|
|
||||||
devctl freeze
|
devctl freeze
|
||||||
x=$(echo '#'${devmatch_blocklist:-${devmatch_blacklist}}'#' | \
|
x=$(echo "#${devmatch_blocklist:-${devmatch_blacklist}}#$(kenv -q devmatch_blocklist)#" | \
|
||||||
sed -e "s/ /#/g;s/\.ko#/#/g")
|
sed -e "s/ /#/g;s/\.ko#/#/g")
|
||||||
for m in ${list}; do
|
for m in ${list}; do
|
||||||
m="${m%.ko}"
|
m="${m%.ko}"
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd October 12, 2020
|
.Dd November 21, 2021
|
||||||
.Dt DEVMATCH 8
|
.Dt DEVMATCH 8
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -67,6 +67,7 @@ tables with that PNP info can not be found.
|
|||||||
Produce more verbose output.
|
Produce more verbose output.
|
||||||
.El
|
.El
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
|
.Xr rc.conf 5 ,
|
||||||
.Xr devinfo 8 ,
|
.Xr devinfo 8 ,
|
||||||
.Xr MODULE_PNP_INFO 9
|
.Xr MODULE_PNP_INFO 9
|
||||||
.Sh HISTORY
|
.Sh HISTORY
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd November 18, 2021
|
.Dd November 21, 2021
|
||||||
.Dt RC.CONF 5
|
.Dt RC.CONF 5
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -261,6 +261,12 @@ disable auto-loading of kernel modules with
|
|||||||
.Pq Vt str
|
.Pq Vt str
|
||||||
A whitespace-separated list of kernel modules to be ignored by
|
A whitespace-separated list of kernel modules to be ignored by
|
||||||
.Xr devmatch 8 .
|
.Xr devmatch 8 .
|
||||||
|
In addition, the
|
||||||
|
.Xr kenv 1
|
||||||
|
.Va devmatch_blocklist
|
||||||
|
is appended to this variable to allow disabling of
|
||||||
|
.Xr devmatch 8
|
||||||
|
loaded modules from the boot loader.
|
||||||
.It Va devmatch_blacklist
|
.It Va devmatch_blacklist
|
||||||
.Pq Vt str
|
.Pq Vt str
|
||||||
This variable is deprecated.
|
This variable is deprecated.
|
||||||
|
Loading…
Reference in New Issue
Block a user