Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Aug 2018 05:06:07 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r338234 - head/sbin/init/rc.d
Message-ID:  <201808230506.w7N567Vt062837@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808230506.w7N567Vt062837>