aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/hotplug.xml
diff options
context:
space:
mode:
authorGerard Beekmans <gerard@linuxfromscratch.org>2005-02-19 22:16:42 +0000
committerGerard Beekmans <gerard@linuxfromscratch.org>2005-02-19 22:16:42 +0000
commit81fd230419b0cfd052b08fc1ed352bb7d49975df (patch)
tree24c98d2876e5b457dcb88d39e7cca4905f58691a /chapter06/hotplug.xml
parent2f9131f8390243dbc350fe2eeb9e1d58f0264888 (diff)
Trunk is now identical to Testing
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4648 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06/hotplug.xml')
-rw-r--r--chapter06/hotplug.xml126
1 files changed, 122 insertions, 4 deletions
diff --git a/chapter06/hotplug.xml b/chapter06/hotplug.xml
index 12a3e0d0f..cfa04326d 100644
--- a/chapter06/hotplug.xml
+++ b/chapter06/hotplug.xml
@@ -10,6 +10,12 @@
<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 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>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +23,10 @@
<seglistitem><seg>0.01 SBU</seg><seg>0.1 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Hotplug installation depends on</segtitle>
+<seglistitem><seg>Unchecked</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -26,15 +36,17 @@
<screen><userinput>make install</userinput></screen>
-<para>Copy a file that the &quot;install&quot; target omits.</para>
+<para>Copy a file that the <quote>install</quote> target omits.</para>
<screen><userinput>cp etc/hotplug/pnp.distmap /etc/hotplug</userinput></screen>
-<para>Remove Hotplug's init script:</para>
+<para>Remove the init script that Hotplug installs, since we're going to be
+using the script included with LFS-Bootscripts:</para>
<screen><userinput>rm -rf /etc/init.d</userinput></screen>
-<para>Remove the network hotplug agent:</para>
+<para>Network device hotplugging is not supported by LFS bootscripts yet. For
+that reason, remove the network hotplug agent:</para>
<screen><userinput>rm -f /etc/hotplug/net.agent</userinput></screen>
</sect2>
@@ -42,7 +54,113 @@
<sect2 id="contents-hotplug" role="content"><title>Contents of Hotplug</title>
-<para>See testing</para>
+<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</seg></seglistitem>
+</segmentedlist>
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="hotplug">
+<term><command>hotplug</command></term>
+<listitem>
+<indexterm zone="ch-system-hotplug hotplug"><primary
+sortas="b-hotplug">hotplug</primary></indexterm>
+<para>This script is called by default by Linux kernel when something
+changes in its internal state (e.g., a new device is added or removed).</para>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hotplug-rc">
+<term><command>/etc/hotplug/*.rc</command></term>
+<listitem>
+<indexterm zone="ch-system-hotplug hotplug-rc"><primary
+sortas="d-/etc/hotplug/*.rc">/etc/hotplug/*.rc</primary></indexterm>
+<para>These scripts are used for cold plugging, i.e., detection and other
+specific actions upon hardware already present during system startup.
+They are called by the <filename>hotplug</filename> initscript that comes
+from the LFS-Bootscripts package.
+The <command>*.rc</command>
+scripts try to recover hotplug events that were lost during system boot
+because, e.g., the root filesystem was not mounted by the kernel.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hotplug-agent">
+<term><command>/etc/hotplug/*.agent</command></term>
+<listitem>
+<indexterm zone="ch-system-hotplug hotplug-agent"><primary
+sortas="d-/etc/hotplug/*.agent">/etc/hotplug/*.agent</primary></indexterm>
+<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 user-provided
+scripts, if any.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hotplug-functions">
+<term><filename>/etc/hotplug/hotplug.functions</filename></term>
+<listitem>
+<indexterm zone="ch-system-hotplug hotplug-functions"><primary
+sortas="e-/etc/hotplug/hotplug.functions">/etc/hotplug/hotplug.functions</primary></indexterm>
+<para>This file contains common functions used by other scripts in Hotplug
+package.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hotplug-blacklist">
+<term><filename>/etc/hotplug/blacklist</filename></term>
+<listitem>
+<indexterm zone="ch-system-hotplug hotplug-blacklist"><primary
+sortas="e-/etc/hotplug/blacklist">/etc/hotplug/blacklist</primary></indexterm>
+<para>This file contains the list of modules that should never be
+inserted into the kernel by hotplug scripts.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hotplug-subdirs">
+<term><filename class="directory">/etc/hotplug/{pci,usb}</filename></term>
+<listitem>
+<indexterm zone="ch-system-hotplug hotplug-subdirs"><primary
+sortas="e-/etc/hotplug/{pci,usb}">/etc/hotplug/{pci,usb}</primary></indexterm>
+<para>These directories are supposed to contain user-written handlers for
+hotplug events.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hotplug-usb.usermap">
+<term><filename>/etc/hotplug/usb.usermap</filename></term>
+<listitem>
+<indexterm zone="ch-system-hotplug hotplug-usb.usermap"><primary
+sortas="e-/etc/hotplug/usb.usermap">/etc/hotplug/usb.usermap</primary></indexterm>
+<para>This file contains rules that determine which user-defined handlers to
+call for each USB device, based on its vendor, id and other attributes.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hotplug-hotplug.d">
+<term><filename class="directory">/etc/hotplug.d</filename></term>
+<listitem>
+<indexterm zone="ch-system-hotplug hotplug-hotplug.d"><primary
+sortas="e-/etc/hotplug.d">/etc/hotplug.d</primary></indexterm>
+<para>This directory contains programs (or symlinks to them)
+that are interested in receiving hotplug events. E.g.,
+<application>Udev</application> puts its symlink here during installation.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>