History log of /src/libexec/rc/rc.d/devmatch (Results 1 – 23 of 23)
Revision Date Author Comments
# d3ed0e0a 03-Feb-2026 Thibault Payet <contact@thibaultpayet.fr>

rc.d: Convert more service to Use startmsg

Signed-off-by: Thibault Payet <contact@thibaultpayet.fr>
Reviewed by: imp,mhorne
Pull Request: https://github.com/freebsd/freebsd-src/pull/2001


# 17aec740 14-Dec-2024 Kyle Evans <kevans@FreeBSD.org>

devmatch: do nothing if booted in safe mode

Safe mode may be enabled because of some problem discovered with a kmod,
thus wanting to avoid devmatch. Honor it and let the user deal with
the fallout

devmatch: do nothing if booted in safe mode

Safe mode may be enabled because of some problem discovered with a kmod,
thus wanting to avoid devmatch. Honor it and let the user deal with
the fallout of not autoloading modules. We've at least made it to
userland and the user demonstrably has a local console as they selected
safe mode in the first place, so this shouldn't be fatal if we don't,
e.g., load a necessary NIC driver.

show more ...


# 62775aeb 28-Aug-2024 Jessica Clarke <jrtc27@FreeBSD.org>

rc.d/devmatch: Silence sysctl hw.bus.devctl_nomatch_enabled=1

As with various other rc scripts, we don't want the output from this
being visible in the boot log.

Fixes: 6437872c1d66 ("New sysctl t

rc.d/devmatch: Silence sysctl hw.bus.devctl_nomatch_enabled=1

As with various other rc scripts, we don't want the output from this
being visible in the boot log.

Fixes: 6437872c1d66 ("New sysctl to disable NOMATCH until devmatch runs")
MFC after: 1 week

show more ...


# f99f0ee1 22-May-2024 Alexander Leidinger <netchild@FreeBSD.org>

rc.d: add a service jails config to all base system services

This gives more permissions to services (e.g. network access to
services which require this) when they are started as an automatic
servic

rc.d: add a service jails config to all base system services

This gives more permissions to services (e.g. network access to
services which require this) when they are started as an automatic
service jail.

The sshd patch is important for the sshd-related functionality as
described in the man-page in the service jails part.

The location of the added env vars is supposed to allow overriding them
in rc.conf, and to hard-disable the use of svcj for some parts where it
doesn't make sense or will not work.

Only a subset of all of the services are fully tested (I'm running this
since more than a year with various services started as service jails).
The untested parts should be most of the time ok, in some edge-cases
more permissions are needed inside the service jail.
Differential Revision: https://reviews.freebsd.org/D40371

show more ...


# 6437872c 29-Apr-2024 Isaac Cilia Attard <iciliaat@gmail.com>

New sysctl to disable NOMATCH until devmatch runs

Introduce hw.bus.devctl_nomatch_enabled and use it to suppress NOMATCH
until devmatch runs

There's a lot of NOMATCH events generated at boot. We al

New sysctl to disable NOMATCH until devmatch runs

Introduce hw.bus.devctl_nomatch_enabled and use it to suppress NOMATCH
until devmatch runs

There's a lot of NOMATCH events generated at boot. We also run devmatch
once during early boot to load unmatched devices. To avoid redundant
work, don't start generating NOMATCH events until after devmatch runs.
Set hw.bus.devctl_nomatch_enabled=1 just before we run devmatch. The
kernel will suppress NOMATCH events until this is set to true.

This saves about 170ms from the boot on aarch64 running atop Apple
M-series processors and the VMWare Fusion hypervisor.

Reviewed by: imp, cperciva
MFC after: 3 days
Sponsored by: Google Summer of Code
Pull Request: https://github.com/freebsd/freebsd-src/pull/1213

show more ...


# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# a8935083 21-Nov-2021 Warner Losh <imp@FreeBSD.org>

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 b

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

show more ...


# 5549c6a6 08-Jul-2021 Warner Losh <imp@FreeBSD.org>

devmatch: don't announce autoloading so much

devmatch rc script would announce it was loading a module multiple
times. It used kldload -n so it really wasn't loading it that many
times, but the mess

devmatch: don't announce autoloading so much

devmatch rc script would announce it was loading a module multiple
times. It used kldload -n so it really wasn't loading it that many
times, but the message is confusing. Use kldstat to see if we need to
load the module before saying we do. This fixes the vast majority of the
problems. It may be possible to race devmatch with a user invocation and
devd, though quite hard. In that case we'll announce things twice, but
still only load it once. No attempt is made to fix this.

PR: 232782
MFC After: 2 weeks
Sponsored by: Netflix

show more ...


# b29ebb9c 08-Jul-2021 Warner Losh <imp@FreeBSD.org>

devmatch: Be tolerant of .ko being present.

We document that we did not need .ko on the module names in
devmatch_blocklist, but we really needed them. Keep the documentation
the same, but strip the

devmatch: Be tolerant of .ko being present.

We document that we did not need .ko on the module names in
devmatch_blocklist, but we really needed them. Keep the documentation
the same, but strip the .ko when we need to use the names so you can
specify either.

PR: 256240
MFC After: 2 weeks
Sponsored by: Netflix

show more ...


# f68e3ea8 07-Jul-2021 Helge Oldach <freebsd@oldach.net>

devmatch: defer until after kld

devmatch loads a number of things automatically. Allow the list of
things to load to happen first in case those drivers affect what would
be loaded. Normally, this wi

devmatch: defer until after kld

devmatch loads a number of things automatically. Allow the list of
things to load to happen first in case those drivers affect what would
be loaded. Normally, this will produce the same results, but there's
some special cases that may not when drivers are loaded that report
other drivers missing, like virtio_pci.

PR: 253287
Reviewed by: imp
MFC After: 2 weeks

show more ...


# c43b0081 18-Jun-2021 Ceri Davies <ceri@FreeBSD.org>

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

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

show more ...


# 3cc62032 16-May-2020 Colin Percival <cperciva@FreeBSD.org>

Move the devmatch rc.d script before netif in the boot process.

Prior to this change, using lagg to aggregate wired and wireless networks
was broken in the (relatively common) case where wifi driver

Move the devmatch rc.d script before netif in the boot process.

Prior to this change, using lagg to aggregate wired and wireless networks
was broken in the (relatively common) case where wifi drivers + firmware
are loaded by devmatch, since the interface didn't exist at the time when
the lagg interface was being created.

Suggested by: imp
MFC after: 3 days

show more ...


# f86e6000 04-Dec-2019 Warner Losh <imp@FreeBSD.org>

Regularize my copyright notice

o Remove All Rights Reserved from my notices
o imp@FreeBSD.org everywhere
o regularize punctiation, eliminate date ranges
o Make sure that it's clear that I don't clai

Regularize my copyright notice

o Remove All Rights Reserved from my notices
o imp@FreeBSD.org everywhere
o regularize punctiation, eliminate date ranges
o Make sure that it's clear that I don't claim All Rights reserved by listing
All Rights Reserved on same line as other copyright holders (but not
me). Other such holders are also listed last where it's clear.

show more ...


# 0696600c 17-Oct-2018 Bjoern A. Zeeb <bz@FreeBSD.org>

Move the rc framework out of sbin/init into libexec/rc.

The reasons for this are forward looking to pkgbase:
* /sbin/init is a special binary; try not to replace it with
every package update bec

Move the rc framework out of sbin/init into libexec/rc.

The reasons for this are forward looking to pkgbase:
* /sbin/init is a special binary; try not to replace it with
every package update because an rc script was touched.
(a follow-up commit will make init its own package)
* having rc in its own place will allow more easy replacement
of the rc framework with alternatives, such as openrc.

Discussed with: brd (during BSDCam), kmoore
Requested by: cem, bz
PR: 231522
Approved by: re (gjb)

show more ...


# 8a317ce4 23-Aug-2018 Warner Losh <imp@FreeBSD.org>

Implement blacklisting for devmatch

devmatch_blacklist is a space separated list of modules (w/o the .ko
or full path) to exclude from devmatch's processing.

Differential Revision: https://reviews.

Implement blacklisting for devmatch

devmatch_blacklist is a space separated list of modules (w/o the .ko
or full path) to exclude from devmatch's processing.

Differential Revision: https://reviews.freebsd.org/D16735

show more ...


# 87698583 23-Aug-2018 Warner Losh <imp@FreeBSD.org>

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://revie

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

show more ...


# 1135e97b 28-Jul-2018 Brad Davis <brd@FreeBSD.org>

Move rc startup scripts from etc/ to sbin/init/

This keeps most startup scripts as CONFS per discussion on src-committers from
back during BSDCan.

Approved by: will (mentor)
Differential Revision:

Move rc startup scripts from etc/ to sbin/init/

This keeps most startup scripts as CONFS per discussion on src-committers from
back during BSDCan.

Approved by: will (mentor)
Differential Revision: https://reviews.freebsd.org/D16466

show more ...


# 9d3730e5 14-Jun-2018 Kyle Evans <kevans@FreeBSD.org>

devmatch: Address some rc nits

- devmatch_enable in rc.conf(5) was not gating the start of devmatch

- Use quietstart in devd/devmatch to suppress dozens of 'Cannot start'
messages and other spuri

devmatch: Address some rc nits

- devmatch_enable in rc.conf(5) was not gating the start of devmatch

- Use quietstart in devd/devmatch to suppress dozens of 'Cannot start'
messages and other spurious messages from rc.subr(8) that aren't
necessarily helpful.

Discussed with: imp

show more ...


# e4eef188 01-May-2018 Warner Losh <imp@FreeBSD.org>

Use M. Warner Losh everywhere on my copyrights.
Remove 'All Rights Reserved' where I can.


# 974a9594 17-Feb-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Fix handling of "one_nomatch" shell variable to preserve its contents
appearing as a single argument passed to devmatch(8).

Don't depend on "sort" utility from usr/bin which might not be
available w

Fix handling of "one_nomatch" shell variable to preserve its contents
appearing as a single argument passed to devmatch(8).

Don't depend on "sort" utility from usr/bin which might not be
available when devd is started.

Sponsored by: Mellanox Technologies

show more ...


# 7e1637e4 17-Feb-2018 Warner Losh <imp@FreeBSD.org>

If we're passed an argument, then treat it as a single NOMATCH event
to parse rather than searching for all events. Pass with new -p arg to
devmatch. devmatch will use that one event rather than walk

If we're passed an argument, then treat it as a single NOMATCH event
to parse rather than searching for all events. Pass with new -p arg to
devmatch. devmatch will use that one event rather than walking the
entire tree.

kldload will stop at the first failure. So we need to loop. Also,
symbolic links may confused kldload into trying (and failing) to load
multiple modules at once, so guard against that.

Noticed by: hps (with similar patch)
Sponsored by: Netflix

show more ...


# 4d6e935e 12-Feb-2018 Warner Losh <imp@FreeBSD.org>

Install devmatch int /etc/rc.d and echo modules being installed.


# c0c6f4d2 12-Feb-2018 Warner Losh <imp@FreeBSD.org>

Add devmatch rc.d integration

Create simple script to load modules on demand based on the device
identifying information.

Sponsored by: Netflix