1.\" 2.\" Copyright (c) 2002 M. Warner Losh 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. The name of the author may not be used to endorse or promote products 11.\" derived from this software without specific prior written permission. 12.\" 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 23.\" SUCH DAMAGE. 24.\" 25.\" $FreeBSD$ 26.\" 27.\" The section on comments was taken from named.conf.5, which has the 28.\" following copyright: 29.\" Copyright (c) 1999-2000 by Internet Software Consortium 30.\" 31.\" Permission to use, copy, modify, and distribute this software for any 32.\" purpose with or without fee is hereby granted, provided that the above 33.\" copyright notice and this permission notice appear in all copies. 34.\" 35.\" THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS 36.\" ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES 37.\" OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE 38.\" CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 39.\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 40.\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 41.\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 42.\" SOFTWARE. 43.Dd October 17, 2002 44.Dt DEVD.CONF 5 45.Os 46.Sh NAME 47.Nm devd.conf 48.Nd configuration file for 49.Xr devd 8 50.Sh OVERVIEW 51.Ss General Syntax 52A 53.Xr devd 8 54configuration consists of two general features, statements 55and comments. 56All statements end with a semicolon. 57Many statements can contain substatements, which are each also 58terminated with a semicolon. 59.Pp 60The following statements are supported: 61.Bl -tag -width 0n 62.It Ic options 63specifies various options and parameters for the operation of 64.Xr devd 8 . 65.It Ic attach 66specifies various matching criteria and actions to perform when 67a newly attached device matches said criteria. 68.It Ic detach 69specifies various matching criteria and actions to perform when 70a newly attached device matches said criteria. 71.It Ic nomatch 72specifies various matching criteria and actions to perform when 73no device driver currently loaded in the kernel claims a (new) 74device. 75.El 76.Pp 77Statements may occur in any order in the config file, and may be 78repated as often as required. 79Further details on the syntax and meaning of each statement, and their 80substatements is explained below. 81.Pp 82Comments may appear anywhere that whitespace may appear in a 83configuration file. To appeal to programmers of all kinds, they can 84be written in C, C++, or shell/perl constructs. 85.Pp 86C-style comments start with the two characters 87.Li /* 88(slash, star) and end with 89.Li */ 90(star, slash). 91Because they are completely delimited with these characters, 92they can be used to comment only a portion of a line or to span 93multiple lines. 94.Pp 95C-style comments cannot be nested. For example, the following is 96not valid because the entire comment ends with the first 97.Li */ : 98.Bd -literal -offset indent 99/* This is the start of a comment. 100 This is still part of the comment. 101/* This is an incorrect attempt at nesting a comment. */ 102 This is no longer in any comment. */ 103.Ed 104.Pp 105C++-style comments start with the two characters 106.Li // 107(slash, slash) and continue to the end of the physical line. 108They cannot be continued across multiple physical lines; to have 109one logical comment span multiple lines, each line must use the 110.Li // 111pair. For example: 112.Bd -literal -offset indent 113// This is the start of a comment. The next line 114// is a new comment, even though it is logically 115// part of the previous comment. 116.Ed 117.Sh FILES 118.Bl -tag -width /etc/devd.conf -compact 119.It Pa /etc/devd.conf 120The 121.Xr devd 8 122configuration file. 123.El 124.Sh SEE ALSO 125.Xr devd 8 126.Sh BUGS 127devd currently always runs "/etc/devd-generic $device $startstop" for 128all device events, reguardless of what the config file says to do. 129