| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188 | <?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [  <!ENTITY % general-entities SYSTEM "../general.ent">  %general-entities;]><sect1 id="ch-system-hotplug" xreflabel="Hotplug" role="wrap"><title>Hotplug-&hotplug-version;</title><?dbhtml filename="hotplug.html"?><indexterm zone="ch-system-hotplug"><primary sortas="a-Hotplug">Hotplug</primary></indexterm><sect2 role="package"><title/><para>The Hotplug package contains scripts that react upon hotplug eventsgenerated by the kernel. Such events correspond to every change in the kernelstate visible in the <systemitem class="filesystem">sysfs</systemitem>filesystem, e.g., the addition and removal of hardware. This package alsodetects existing hardware during boot and inserts the relevant modules into therunning kernel.</para><segmentedlist><segtitle>&buildtime;</segtitle><segtitle>&diskspace;</segtitle><seglistitem><seg>0.01 SBU</seg><seg>460 KB</seg></seglistitem></segmentedlist><segmentedlist><segtitle>&dependencies;</segtitle><seglistitem><seg>Bash, Coreutils, Find, Gawk, and Make</seg></seglistitem></segmentedlist></sect2><sect2 role="installation"><title>Installation of Hotplug</title><para>This package does not come with a test suite.</para><para>Install the Hotplug package:</para><screen><userinput>make install</userinput></screen><para>Copy a file that the <quote>install</quote> target omits.</para><screen><userinput>cp -v etc/hotplug/pnp.distmap /etc/hotplug</userinput></screen><para>Remove the init script that Hotplug installs since we are going to beusing the script included in the LFS-Bootscripts package:</para><screen><userinput>rm -rfv /etc/init.d</userinput></screen><para>Network device hotplugging is not yet supported by the LFS-Bootscriptspackage. For that reason, remove the network hotplug agent:</para><screen><userinput>rm -fv /etc/hotplug/net.agent</userinput></screen><para>Create a directory for storing firmware that can be loaded by<command>hotplug</command>:</para><screen><userinput>mkdir -v /lib/firmware</userinput></screen></sect2><sect2 id="contents-hotplug" role="content"><title>Contents of Hotplug</title><segmentedlist><segtitle>Installed program</segtitle><segtitle>Installed scripts</segtitle><segtitle>Installed files</segtitle><seglistitem><seg>hotplug</seg><seg>/etc/hotplug/*.rc, /etc/hotplug/*.agent</seg><seg>/etc/hotplug/hotplug.functions, /etc/hotplug/blacklist, /etc/hotplug/{pci,usb},/etc/hotplug/usb.usermap, /etc/hotplug.d, and /var/log/hotplug/events</seg></seglistitem></segmentedlist><variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead><?dbfo list-presentation="list"?><?dbhtml list-presentation="table"?><varlistentry id="hotplug"><term><command>hotplug</command></term><listitem><para>This script is called by default by the Linux kernel when somethingchanges in its internal state (e.g., a new device is added or an existing deviceis removed)</para><indexterm zone="ch-system-hotplug hotplug"><primarysortas="b-hotplug">hotplug</primary></indexterm></listitem></varlistentry><varlistentry id="hotplug-rc"><term><command>/etc/hotplug/*.rc</command></term><listitem><para>These scripts are used for cold plugging, i.e., detecting and acting uponhardware already present during system startup. They are called by the<filename>hotplug</filename> initscript included in the LFS-Bootscripts package.The <command>*.rc</command> scripts try to recover hotplug events that were lostduring system boot because, for example, the root filesystem was not mounted bythe kernel</para><indexterm zone="ch-system-hotplug hotplug-rc"><primarysortas="d-/etc/hotplug/*.rc">/etc/hotplug/*.rc</primary></indexterm></listitem></varlistentry><varlistentry id="hotplug-agent"><term><command>/etc/hotplug/*.agent</command></term><listitem><para>These scripts are called by <command>hotplug</command>in response to different types of hotplug events generated by the kernel.Their action is to insert corresponding kernel modules and call anyuser-provided scripts</para><indexterm zone="ch-system-hotplug hotplug-agent"><primarysortas="d-/etc/hotplug/*.agent">/etc/hotplug/*.agent</primary></indexterm></listitem></varlistentry><varlistentry id="hotplug-blacklist"><term><filename>/etc/hotplug/blacklist</filename></term><listitem><para>This file contains the list of modules that should never be inserted intothe kernel by the Hotplug scripts</para><indexterm zone="ch-system-hotplug hotplug-blacklist"><primarysortas="e-/etc/hotplug/blacklist">/etc/hotplug/blacklist</primary></indexterm></listitem></varlistentry><varlistentry id="hotplug-functions"><term><filename>/etc/hotplug/hotplug.functions</filename></term><listitem><para>This file contains common functions used by other scripts in the Hotplugpackage</para><indexterm zone="ch-system-hotplug hotplug-functions"><primarysortas="e-/etc/hotplug/hotplug.functions">/etc/hotplug/hotplug.functions</primary></indexterm></listitem></varlistentry><varlistentry id="hotplug-subdirs"><term><filename class="directory">/etc/hotplug/{pci,usb}</filename></term><listitem><para>These directories contain user-written handlers for hotplug events</para><indexterm zone="ch-system-hotplug hotplug-subdirs"><primarysortas="e-/etc/hotplug/{pci,usb}">/etc/hotplug/{pci,usb}</primary></indexterm></listitem></varlistentry><varlistentry id="hotplug-usb.usermap"><term><filename>/etc/hotplug/usb.usermap</filename></term><listitem><para>This file contains rules that determine which user-defined handlers tocall for each USB device, based on its vendor ID and other attributes</para><indexterm zone="ch-system-hotplug hotplug-usb.usermap"><primarysortas="e-/etc/hotplug/usb.usermap">/etc/hotplug/usb.usermap</primary></indexterm></listitem></varlistentry><varlistentry id="hotplug-hotplug.d"><term><filename class="directory">/etc/hotplug.d</filename></term><listitem><para>This directory contains programs (or symlinks to them) that are interestedin receiving hotplug events. For example, Udev puts its symlink here duringinstallation</para><indexterm zone="ch-system-hotplug hotplug-hotplug.d"><primarysortas="e-/etc/hotplug.d">/etc/hotplug.d</primary></indexterm></listitem></varlistentry><varlistentry id="hotplug-firmware"><term><filename class="directory">/lib/firmware</filename></term><listitem><para>This directory contains the firmware for devices that need to have theirfirmware loaded before use</para><indexterm zone="ch-system-hotplug hotplug-firmware"><primarysortas="e-/lib/firmware">/lib/firmware</primary></indexterm></listitem></varlistentry><varlistentry id="hotplug-events"><term><filename>/var/log/hotplug/events</filename></term><listitem><para>This file contains all the events that <command>hotplug</command> hascalled since bootup</para><indexterm zone="ch-system-hotplug hotplug-events"><primarysortas="e-/var/log/hotplug/events">/var/log/hotplug/events</primary></indexterm></listitem></varlistentry></variablelist></sect2></sect1>
 |