2004-05-20 02:47:22 +01:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2005-01-30 18:06:48 +00:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
2004-05-20 02:47:22 +01:00
|
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
2005-05-23 21:07:49 +01:00
|
|
|
<!ENTITY % patches-entities SYSTEM "../patches.ent">
|
2004-05-20 02:47:22 +01:00
|
|
|
%general-entities;
|
2005-05-23 21:07:49 +01:00
|
|
|
%patches-entities;
|
2004-05-20 02:47:22 +01:00
|
|
|
]>
|
2004-05-20 17:21:42 +01:00
|
|
|
<sect1 id="ch-system-hotplug" xreflabel="Hotplug" role="wrap">
|
2004-05-20 02:47:22 +01:00
|
|
|
<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/>
|
2005-02-19 22:16:42 +00:00
|
|
|
<para>The Hotplug package contains scripts that react upon hotplug events
|
|
|
|
generated by the kernel. Such events correspond to every change in the kernel
|
|
|
|
state visible in the <systemitem class="filesystem">sysfs</systemitem>
|
|
|
|
filesystem, e.g., the addition and removal of hardware. This package also
|
|
|
|
detects existing hardware during boot and inserts the relevant modules into the
|
|
|
|
running kernel.</para>
|
2004-05-20 02:47:22 +01:00
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>&buildtime;</segtitle>
|
|
|
|
<segtitle>&diskspace;</segtitle>
|
2005-06-14 07:08:58 +01:00
|
|
|
<seglistitem><seg>0.01 SBU</seg><seg>460 KB</seg></seglistitem>
|
2004-05-20 02:47:22 +01:00
|
|
|
</segmentedlist>
|
|
|
|
|
2005-02-19 22:16:42 +00:00
|
|
|
<segmentedlist>
|
2005-02-24 22:26:46 +00:00
|
|
|
<segtitle>&dependencies;</segtitle>
|
2005-06-19 09:35:01 +01:00
|
|
|
<seglistitem><seg>Bash, Coreutils, Find, Gawk, and Make</seg></seglistitem>
|
2005-02-19 22:16:42 +00:00
|
|
|
</segmentedlist>
|
2004-05-20 02:47:22 +01:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of Hotplug</title>
|
|
|
|
|
2004-09-22 13:43:57 +01:00
|
|
|
<para>Install the Hotplug package:</para>
|
2004-05-20 02:47:22 +01:00
|
|
|
|
|
|
|
<screen><userinput>make install</userinput></screen>
|
|
|
|
|
2005-02-19 22:16:42 +00:00
|
|
|
<para>Copy a file that the <quote>install</quote> target omits.</para>
|
2005-02-05 11:28:20 +00:00
|
|
|
|
2005-09-29 21:55:40 +01:00
|
|
|
<screen><userinput>cp -v etc/hotplug/pnp.distmap /etc/hotplug</userinput></screen>
|
2005-02-05 11:28:20 +00:00
|
|
|
|
2005-07-01 21:39:25 +01:00
|
|
|
<para>Remove the init script that Hotplug installs since we are going to be
|
|
|
|
using the script included in the LFS-Bootscripts package:</para>
|
2004-05-20 02:47:22 +01:00
|
|
|
|
2005-09-29 21:55:40 +01:00
|
|
|
<screen><userinput>rm -rfv /etc/init.d</userinput></screen>
|
2004-05-20 02:47:22 +01:00
|
|
|
|
2005-07-01 21:39:25 +01:00
|
|
|
<para>Network device hotplugging is not yet supported by the LFS-Bootscripts
|
|
|
|
package. For that reason, remove the network hotplug agent:</para>
|
2004-06-24 15:27:04 +01:00
|
|
|
|
2005-09-29 21:55:40 +01:00
|
|
|
<screen><userinput>rm -fv /etc/hotplug/net.agent</userinput></screen>
|
2005-03-14 06:40:47 +00:00
|
|
|
|
2005-06-19 09:14:11 +01:00
|
|
|
<para>Create a directory for storing firmware that can be loaded by
|
2005-04-11 19:56:07 +01:00
|
|
|
<command>hotplug</command>:</para>
|
2005-03-14 06:40:47 +00:00
|
|
|
|
2005-09-29 21:55:40 +01:00
|
|
|
<screen><userinput>mkdir -v /lib/firmware</userinput></screen>
|
2005-03-14 06:40:47 +00:00
|
|
|
|
2004-05-20 02:47:22 +01:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
|
|
|
|
<sect2 id="contents-hotplug" role="content"><title>Contents of Hotplug</title>
|
|
|
|
|
2005-02-19 22:16:42 +00:00
|
|
|
<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>
|
2005-06-19 09:14:11 +01:00
|
|
|
<seg>/etc/hotplug/hotplug.functions, /etc/hotplug/blacklist, /etc/hotplug/{pci,usb},
|
2005-06-21 22:07:51 +01:00
|
|
|
/etc/hotplug/usb.usermap, /etc/hotplug.d, and /var/log/hotplug/events</seg></seglistitem>
|
2005-02-19 22:16:42 +00:00
|
|
|
</segmentedlist>
|
2004-05-20 02:47:22 +01:00
|
|
|
|
2005-02-19 22:16:42 +00:00
|
|
|
<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
2005-02-24 18:32:19 +00:00
|
|
|
<?dbhtml list-presentation="table"?>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
|
|
|
<varlistentry id="hotplug">
|
|
|
|
<term><command>hotplug</command></term>
|
|
|
|
<listitem>
|
2005-03-14 20:30:17 +00:00
|
|
|
<para>This script is called by default by the Linux kernel when something
|
2005-06-16 17:47:40 +01:00
|
|
|
changes in its internal state (e.g., a new device is added or an existing device
|
|
|
|
is removed)</para>
|
2005-06-19 09:19:25 +01:00
|
|
|
<indexterm zone="ch-system-hotplug hotplug"><primary
|
|
|
|
sortas="b-hotplug">hotplug</primary></indexterm>
|
2005-02-19 22:16:42 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="hotplug-rc">
|
|
|
|
<term><command>/etc/hotplug/*.rc</command></term>
|
|
|
|
<listitem>
|
2005-03-14 20:30:17 +00:00
|
|
|
<para>These scripts are used for cold plugging, i.e., detecting and acting upon
|
2005-07-01 21:39:25 +01:00
|
|
|
hardware 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 lost
|
|
|
|
during system boot because, for example, the root filesystem was not mounted by
|
|
|
|
the kernel</para>
|
2005-06-19 09:19:25 +01:00
|
|
|
<indexterm zone="ch-system-hotplug hotplug-rc"><primary
|
|
|
|
sortas="d-/etc/hotplug/*.rc">/etc/hotplug/*.rc</primary></indexterm>
|
2005-02-19 22:16:42 +00:00
|
|
|
</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.
|
2005-03-14 20:30:17 +00:00
|
|
|
Their action is to insert corresponding kernel modules and call any
|
2005-04-11 19:56:07 +01:00
|
|
|
user-provided scripts</para>
|
2005-06-19 09:19:25 +01:00
|
|
|
<indexterm zone="ch-system-hotplug hotplug-agent"><primary
|
|
|
|
sortas="d-/etc/hotplug/*.agent">/etc/hotplug/*.agent</primary></indexterm>
|
2005-02-19 22:16:42 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="hotplug-blacklist">
|
|
|
|
<term><filename>/etc/hotplug/blacklist</filename></term>
|
|
|
|
<listitem>
|
2005-03-14 20:30:17 +00:00
|
|
|
<para>This file contains the list of modules that should never be inserted into
|
2005-04-11 19:56:07 +01:00
|
|
|
the kernel by the Hotplug scripts</para>
|
2005-06-19 09:19:25 +01:00
|
|
|
<indexterm zone="ch-system-hotplug hotplug-blacklist"><primary
|
|
|
|
sortas="e-/etc/hotplug/blacklist">/etc/hotplug/blacklist</primary></indexterm>
|
2005-02-19 22:16:42 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2005-03-14 20:38:18 +00:00
|
|
|
<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 Hotplug
|
2005-04-11 19:56:07 +01:00
|
|
|
package</para>
|
2005-06-19 09:19:25 +01:00
|
|
|
<indexterm zone="ch-system-hotplug hotplug-functions"><primary
|
|
|
|
sortas="e-/etc/hotplug/hotplug.functions">/etc/hotplug/hotplug.functions</primary></indexterm>
|
2005-03-14 20:38:18 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2005-02-19 22:16:42 +00:00
|
|
|
<varlistentry id="hotplug-subdirs">
|
|
|
|
<term><filename class="directory">/etc/hotplug/{pci,usb}</filename></term>
|
|
|
|
<listitem>
|
2005-06-19 09:19:25 +01:00
|
|
|
<para>These directories contain user-written handlers for hotplug events</para>
|
2005-02-19 22:16:42 +00:00
|
|
|
<indexterm zone="ch-system-hotplug hotplug-subdirs"><primary
|
|
|
|
sortas="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 to
|
2005-04-11 19:56:07 +01:00
|
|
|
call for each USB device, based on its vendor ID and other attributes</para>
|
2005-06-19 09:19:25 +01:00
|
|
|
<indexterm zone="ch-system-hotplug hotplug-usb.usermap"><primary
|
|
|
|
sortas="e-/etc/hotplug/usb.usermap">/etc/hotplug/usb.usermap</primary></indexterm>
|
2005-02-19 22:16:42 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="hotplug-hotplug.d">
|
|
|
|
<term><filename class="directory">/etc/hotplug.d</filename></term>
|
|
|
|
<listitem>
|
2005-03-14 20:30:17 +00:00
|
|
|
<para>This directory contains programs (or symlinks to them) that are interested
|
2005-06-23 18:27:03 +01:00
|
|
|
in receiving hotplug events. For example, Udev puts its symlink here during
|
|
|
|
installation</para>
|
2005-06-19 09:19:25 +01:00
|
|
|
<indexterm zone="ch-system-hotplug hotplug-hotplug.d"><primary
|
|
|
|
sortas="e-/etc/hotplug.d">/etc/hotplug.d</primary></indexterm>
|
2005-02-19 22:16:42 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2005-03-14 06:40:47 +00:00
|
|
|
|
|
|
|
<varlistentry id="hotplug-firmware">
|
|
|
|
<term><filename class="directory">/lib/firmware</filename></term>
|
|
|
|
<listitem>
|
2005-03-14 20:30:17 +00:00
|
|
|
<para>This directory contains the firmware for devices that need to have their
|
2005-04-11 19:56:07 +01:00
|
|
|
firmware loaded before use</para>
|
2005-06-19 09:19:25 +01:00
|
|
|
<indexterm zone="ch-system-hotplug hotplug-firmware"><primary
|
|
|
|
sortas="e-/lib/firmware">/lib/firmware</primary></indexterm>
|
2005-03-14 06:40:47 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2005-03-14 20:38:18 +00:00
|
|
|
<varlistentry id="hotplug-events">
|
|
|
|
<term><filename>/var/log/hotplug/events</filename></term>
|
|
|
|
<listitem>
|
2005-06-19 09:14:11 +01:00
|
|
|
<para>This file contains all the events that <command>hotplug</command> has
|
2005-04-11 19:56:07 +01:00
|
|
|
called since bootup</para>
|
2005-06-19 09:19:25 +01:00
|
|
|
<indexterm zone="ch-system-hotplug hotplug-events"><primary
|
|
|
|
sortas="e-/var/log/hotplug/events">/var/log/hotplug/events</primary></indexterm>
|
2005-03-14 20:38:18 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2005-02-19 22:16:42 +00:00
|
|
|
</variablelist>
|
2004-05-23 16:17:47 +01:00
|
|
|
</sect2>
|
2004-05-20 02:47:22 +01:00
|
|
|
</sect1>
|