diff options
author | n_hibma <n_hibma@FreeBSD.org> | 1999-11-28 21:27:31 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 1999-11-28 21:27:31 +0000 |
commit | 66bb1ef94c517bcefd46de4d10b0dd8afa0e234f (patch) | |
tree | 3d6ba03a311097cc668827f1e1143fd55acdc55a /usr.sbin/usbd/usbd.conf.5 | |
parent | d2ef3b0fa085c1fa1e97986e1c9d0ddf51390bda (diff) | |
download | FreeBSD-src-66bb1ef94c517bcefd46de4d10b0dd8afa0e234f.zip FreeBSD-src-66bb1ef94c517bcefd46de4d10b0dd8afa0e234f.tar.gz |
Add the ability to match on device names attached to.
If a device is attached to ums4, you can reference this devname in
the configuration file as ${DEVNAME} (a shell variable, yes).
Diffstat (limited to 'usr.sbin/usbd/usbd.conf.5')
-rw-r--r-- | usr.sbin/usbd/usbd.conf.5 | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/usr.sbin/usbd/usbd.conf.5 b/usr.sbin/usbd/usbd.conf.5 index add8518..c7f08c1 100644 --- a/usr.sbin/usbd/usbd.conf.5 +++ b/usr.sbin/usbd/usbd.conf.5 @@ -77,8 +77,14 @@ Device Class Device Subclass .It protocol Ar id Device Protocol -.It devicenames Ar string -Device name, for example umass2, or ums0. +.It devname Ar string +Device name, for example umass2, or ums0. These device names can contain +regular expressions. See +.Xr regex 3 +and +.Xr re_format 7 . +The device name that is matched can be used in the commands below +through adding ${DEVNAME} somewhere in that string. .El .Pp String arguments may be quoted. If a string argument contains a space or @@ -102,9 +108,15 @@ and .Fl -v flags. .Pp +Commands to be executed when the action is matched: +.Bl -tag -width devicename\ <Id> +.It attach Ar string +Shell command to execute when a device is attached. +.It detach Ar string +Shell command to execute when a device is detached. .Sh EXAMPLES A sample entry to rescan the SCSI bus on connection of a -.Tn "Iomega USB Zip Drive" . +.Tn "Iomega USB Zip Drive" : .Bd -literal device "USB Zip drive" product 0x0001 @@ -112,6 +124,13 @@ A sample entry to rescan the SCSI bus on connection of a release 0x0100 attach "/usr/bin/camcontrol rescan bus 0" .Ed +.Pp +To start up moused for a newly attached mouse: +.Bd -literal + device "Mouse" + devname "ums[0-9]+ + attach "/usr/sbin/moused -p /dev/${DEVNAME} -I /var/run/moused.${DEVNAME}.pid" +.El .Sh FILES .Bl -tag -width /etc/pccard.conf -compact .It Pa /etc/usbd.conf |