1 .\" $OpenBSD: hotplugd.8,v 1.10 2009/03/20 17:53:14 jasper Exp $
3 .\" Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org>
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 .Nd devices hot plugging monitor daemon
30 acting on signaled events by executing the scripts in the
34 Actions can be configured either for device attachment or detachment.
35 On device attachment the
37 script is executed if it exists.
38 On device detachment the
40 script is executed if it exists.
41 In both cases two parameters are passed to the scripts: the class and name
42 of the attached or detached device.
43 The device class corresponds to the classes described in the
45 header file and can be one of the following:
47 .Bl -tag -width Ds -offset indent -compact
49 generic, no special info
51 CPU (carries resource utilization)
62 Not all classes are really usable.
63 For example, it's unlikely that a CPU will be hotplugged.
65 The device name is the usual name, as found in
70 .Bl -tag -width "/dev/hotplug/attach" -compact
74 Directory where the scripts to execute are located.
75 .It /etc/hotplug/attach
76 Script to execute on device attachment.
77 .It /etc/hotplug/detach
78 Script to execute on device detachment.
84 .Bd -literal -offset indent
93 disklabel=`/sbin/disklabel $DEVNAME 2\*(Gt&1 | \e
94 sed -n '/^label: /s/^label: //p'`
98 mount -o nodev,nosuid /dev/"$DEVNAME"i /mnt/camera
103 # network devices; requires hostname.$DEVNAME
104 sh /etc/netstart $DEVNAME
113 program first appeared in
118 program was adapted to use
125 program was written by
126 .An Alexander Yurchenko Aq Mt grange@openbsd.org .