2 .\" Copyright (c) 2002 M. Warner Losh <imp@FreeBSD.org>
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .Nd "device state change daemon"
41 daemon provides a way to have userland programs run when certain
44 The following options are accepted.
45 .Bl -tag -width ".Fl f Ar file"
47 Run in the foreground instead of becoming a daemon and log additional information for debugging.
49 Use configuration file
51 instead of the default
55 is specified more than once, the last file specified is used.
57 Limit concurrent socket connections to
59 The default connection limit is 10.
61 Do not process all pending events before becoming a daemon.
62 Instead, call daemon right away.
65 Only log messages at priority LOG_WARNING or above.
67 .Sh IMPLEMENTATION NOTES
71 is a system daemon that runs in the background all the time.
72 Whenever a device is added to or removed from the device tree,
74 will execute actions specified in
80 when an Ethernet adapter is added to the system, and kill the
82 instance when the same adapter is removed.
83 Another example would be for
85 to use a table to locate and load via
87 the proper driver for an unrecognized device that is added to the system.
95 This device driver has hooks into the device configuration system.
96 When nodes are added or deleted from the tree, this device will
97 deliver information about the event to
101 has parsed the message, it will search its action list for that kind
102 of event and perform the action with the highest matching value.
103 For most mundane uses, the default handlers are adequate.
104 However, for more advanced users, the power is present to tweak every
105 aspect of what happens.
112 or the alternate configuration file specified with a
114 option and uses that file to drive the rest of the process.
115 While the format of this file is described in
117 some basics are covered here.
120 section, one can define multiple directories to search
122 All files in these directories whose names match the pattern
125 These files are intended to be installed by third party vendors that
126 wish to hook into the
128 system without modifying the user's other
133 allows only one active reader,
135 multiplexes it, forwarding all events to any number of connected clients.
136 Clients connect by opening the SOCK_SEQPACKET
139 .Pa /var/run/devd.seqpacket.pipe .
141 .Bl -tag -width ".Pa /var/run/devd.seqpacket.pipe" -compact
142 .It Pa /etc/devd.conf
146 .It Pa /var/run/devd.seqpacket.pipe
149 to communicate with its clients.
150 .It Pa /var/run/devd.pipe
151 A deprecated socket retained for use with old clients.
159 utility first appeared in