diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2026-06-23 15:23:34 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2026-06-23 15:23:34 +0000 |
| commit | b9f616d031566e94e6967a2c533b8aa7f36123b9 (patch) | |
| tree | 2f26994e281f013f13fe2404f90a9bd2599182da | |
| parent | a95d324dd3107afcbc16767d183acca7a57ebca9 (diff) | |
rc: Make devmatch use load_kld
The default behavior of load_kld is now robust enough for devmatch.
Switching means settings from /etc/sysctl.kld.d are now properly applied
when the corresponding modules are loaded by devmatch.
While here, reduce the amount of output produced by devmatch from one
line per module to a single line.
MFC after: 1 week
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D57707
| -rwxr-xr-x | libexec/rc/rc.d/devmatch | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libexec/rc/rc.d/devmatch b/libexec/rc/rc.d/devmatch index 4709be1d6588..6038092d9055 100755 --- a/libexec/rc/rc.d/devmatch +++ b/libexec/rc/rc.d/devmatch @@ -67,6 +67,7 @@ devmatch_start() # names with .ko devctl freeze + startmsg -n "Autoloading modules:" x=$(echo "#${devmatch_blocklist:-${devmatch_blacklist}}#$(kenv -q devmatch_blocklist)#" | \ sed -e "s/ /#/g;s/\.ko#/#/g") for m in ${list}; do @@ -74,9 +75,10 @@ devmatch_start() case "${x}" in *"#${m}#"*) continue ;; esac - kldstat -q -n ${m} || \ - (startmsg "Autoloading module: ${m}"; kldload -n ${m}) + load_kld ${m} + startmsg -n " ${m}" done + startmsg "." devctl thaw } |
