svn commit: r338234 - head/sbin/init/rc.d
Warner Losh
imp at FreeBSD.org
Thu Aug 23 05:06:08 UTC 2018
Author: imp
Date: Thu Aug 23 05:06:07 2018
New Revision: 338234
URL: https://svnweb.freebsd.org/changeset/base/338234
Log:
Improve devmatch driver loading
Use devctl freeze / thaw to allow us to laod multiple modules before
doing the probe/attach so they all get a bite at the apple.
Differential Revision: https://reviews.freebsd.org/D16735
Modified:
head/sbin/init/rc.d/devmatch
Modified: head/sbin/init/rc.d/devmatch
==============================================================================
--- head/sbin/init/rc.d/devmatch Thu Aug 23 05:05:47 2018 (r338233)
+++ head/sbin/init/rc.d/devmatch Thu Aug 23 05:06:07 2018 (r338234)
@@ -44,9 +44,9 @@ devmatch_start()
local x
if [ -n "$one_nomatch" ]; then
- x=$(devmatch -p "${one_nomatch}")
+ x=$(devmatch -p "${one_nomatch}" | sort -u)
else
- x=$(devmatch)
+ x=$(devmatch | sort -u)
fi
[ -n "$x" ] || return
@@ -57,10 +57,12 @@ devmatch_start()
# We also optimize against the false positives
# or drivers that have symbolic links that
# confuse devmatch by running it -n.
+ devctl freeze
for m in ${x}; do
echo "Autoloading module: ${m}"
kldload -n ${m}
done
+ devctl thaw
}
load_rc_config $name
More information about the svn-src-head
mailing list