2 .\" Copyright (c) 1999 Nick Hibma. All rights reserved.
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.
12 .\" 3. The name of the author may not be used to endorse or promote products
13 .\" derived from this software without specific prior written permission.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 .\" $FreeBSD: src/usr.sbin/usbd/usbd.conf.5,v 1.13 2003/01/30 22:38:54 trhodes Exp $
27 .\" $DragonFly: src/usr.sbin/usbd/usbd.conf.5,v 1.5 2006/02/17 19:40:29 swildner Exp $
29 .\" Many parts of this manual have been snarfed from the pccard.conf (5) man
30 .\" page, copyright by Andrew McRae.
43 file is the configuration file for the
46 It provides information to allow execution of userland commands
47 on events reported by the
49 subsystem in the kernel.
50 Currently the only events are device attach and
51 detach, but could in the future be extended to include power management
54 The configuration file consists of a sorted list of entries.
56 describes a set of criteria commands.
57 When an event occurs, the criteria
58 are checked and if met, the commands for that event are executed through
60 The list is sorted and scanned from top to bottom.
62 matching entry is used for an event.
64 Each entry contains a number of fields.
65 There are 3 types of fields:
66 descriptive fields, selection criteria and commands to execute on
68 The field names are case sensitive and should be all lower case.
69 Each field can have one or more arguments.
71 The following fields are available:
72 .Bl -tag -width devicename\ <Id>
76 is an arbitrary string used for pretty printing.
82 Release Id, also called revision Id sometimes.
90 Device name, for example umass2, or ums0.
91 These device names can contain regular expressions.
96 The device name that is matched can be used in the commands below
97 through adding ${DEVNAME} somewhere in that string.
100 String arguments may be quoted.
101 If a string argument contains a space or
102 tab character it needs to be enclosed in single or double quotes.
104 argument contains a single or double quote, that quote needs to be
105 enclosed in double or single quotes respectively.
109 Numeric arguments can either be specified in decimal (42), octal (052) or
112 The values for the fields
113 .Li product , vendor , release, class , subclass
116 can be retrieved by killing the
118 daemon and running it with the
124 Commands to be executed when the action is matched:
125 .Bl -tag -width devicename\ <Id>
127 Shell command to execute when a device is attached.
129 Shell command to execute when a device is detached.
132 .Bl -tag -width /etc/usbd.conf -compact
133 .It Pa /etc/usbd.conf
139 A sample entry to rescan the SCSI bus on connection of a
140 .Tn "Iomega USB Zip Drive" :
142 device "USB Zip drive"
146 attach "/usr/bin/camcontrol rescan bus 0"
149 To start up moused for a newly attached mouse:
153 attach "/usr/sbin/moused -p /dev/${DEVNAME} -I /var/run/moused.${DEVNAME}.pid"
160 This manual page was written by
161 .An Nick Hibma Aq n_hibma@FreeBSD.org .
163 It is currently not possible to use a selection criterion more than once.
164 For example, it is not possible to specify more than one vendor ID.