Bug 228977 - /etc/devd/devmatch.conf has bad 'action' line
Summary: /etc/devd/devmatch.conf has bad 'action' line
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: bsdimp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-13 09:34 UTC by Bob Frazier
Modified: 2018-06-14 16:06 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Frazier 2018-06-13 09:34:37 UTC
The new /etc/devd/devmatch.conf has an action line for 'nomatch' in it that does not work correctly.

Instead of passing a single argument containing embedded white space to the /etc/rc.d/devmatch script as parameter 2, the 'service' command strips off the single quote characters, which causes the parameter to be passed as multiple arguments to the 'devmatch' script, instead.

This causes the devmatch program to receive '?' as the parameter following '-p' which gives you an error message similar to:

  devmatch: Malformed NOMATCH string: ''

A simple workaround can be performed by using the following action string:

  action "/etc/rc.d/devmatch start '?$_'";

this avoids calling 'service' and invokes the rc script directly.
Comment 1 Hans Petter Selasky freebsd_committer freebsd_triage 2018-06-13 10:01:43 UTC
Is this related to:
https://reviews.freebsd.org/D15784

--HPS
Comment 2 Charlie Li freebsd_committer freebsd_triage 2018-06-13 17:53:50 UTC
(In reply to Hans Petter Selasky from comment #1)
base r335029 (which that review got committed as) made no difference. The proper behaviour existed prior to base r334982.

This is also not architecture-specific, as I've hit this on amd64.
Comment 3 Warner Losh freebsd_committer freebsd_triage 2018-06-13 18:32:47 UTC
I've had several reports that r335029 fixes this issue. It works for me in my testing as well.
Comment 4 Warner Losh freebsd_committer freebsd_triage 2018-06-13 18:36:21 UTC
It would be helpful to know the exact NOMATCH line that's giving you grief.
can you uncomment the devd lines in syslog.conf and log what it is for me please?
Comment 5 Charlie Li freebsd_committer freebsd_triage 2018-06-13 18:43:48 UTC
I will admit I don't have my entire hardware contingent to properly trigger this. Will need to return to my docking station later to actually check if base r335029 actually fixed things.

The line itself was the generic NOMATCH line changed in base r334982, no local edits on my system.
Comment 6 Bob Frazier 2018-06-14 03:48:35 UTC
I think I forgot to include the uname output in this one (it's r335007), sorry if it caused confusion.

I'll attempt to repro with newer source, see what happens.  This one seemed to be a work-in-progress as well but I'm glad it's (apparently) resolved now.

D15748 appears to address the problem by fixing service (thanks for mentioning that - there is too much to follow it all).