*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> macppc/hotplugd (8)              



NAME    [Toc]    [Back]

     hotplugd - devices hot plugging monitor daemon

SYNOPSIS    [Toc]    [Back]

     hotplugd [-d device]

DESCRIPTION    [Toc]    [Back]

     The hotplugd daemon monitors the  hotplug(4)  pseudo-device,
acting on signaled
  events  by  executing the scripts in the /etc/hotplug
directory.  By
     default it uses the /dev/hotplug device for  reading  events
from, but an
     alternative device can be specified with the -d option.  Actions can be
     configured either for device attachment or  detachment.   On
device attachment
  the attach script is executed if it exists.  On device
     the detach script is executed if it exists.  In  both  cases
two parameters
     are  passed  to  the  scripts: the class and name of the attached or detached
     device.  Device class corresponds to the  classes  described
in the
     <sys/device.h> header file and can be one of the following:

     0       generic, no special info

     1       CPU (carries resource utilization)

     2       disk drive

     3       network interface

     4       tape device

     5       serial line interface

     Not  all classes can be really usable, e.g. it's unlikely to
have a hot
     plug CPU.

     Device name is a usual name including unit number, e.g. sd1.

FILES    [Toc]    [Back]

     /dev/hotplug         Pseudo-device file.
     /etc/hotplug          Directory where the scripts to execute
are located.
     /etc/hotplug/attach  Script to execute on device attachment.
     /etc/hotplug/detach  Script to execute on device detachment.

EXAMPLES    [Toc]    [Back]

     Sample attach script:



           case $DEVCLASS in
                   # disk devices

                   disklabel=`/sbin/disklabel  $DEVNAME  |   grep
'^label:' |                        sed -e 's/^label: //'`
                   case $disklabel in
                           # Sony DSC camera
                           mount /dev/"$DEVNAME"i /mnt/camera

                   # network devices

                   /sbin/dhclient $DEVNAME


SEE ALSO    [Toc]    [Back]


HISTORY    [Toc]    [Back]

     The hotplugd program first appeared in OpenBSD 3.6.

AUTHORS    [Toc]    [Back]

     The hotplugd program was written by Alexander Yurchenko

OpenBSD      3.6                          March      30,     2004
[ Back ]
 Similar pages
Name OS Title
hotplug OpenBSD devices hot plugging
sesd OpenBSD monitor SCSI Environmental Services Devices
audomon HP-UX audit overflow monitor daemon
statd IRIX network status monitor daemon
statd Tru64 Network status monitor daemon
rpc.statd Tru64 Network status monitor daemon
amtickerd IRIX system uptime monitor daemon
kcmond HP-UX EMS Kernel Tunable Monitor daemon
esmd Tru64 Essential Services Monitor daemon
apmd OpenBSD Advanced Power Management monitor daemon
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service