source: chapter06/hotplug.xml@ 90b56f5

6.1 6.1.1
Last change on this file since 90b56f5 was 90b56f5, checked in by Archaic <archaic@…>, 19 years ago

Round 2 of several minor wording changes in chapter 6. (merged from trunk r6258)

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/6.1/BOOK@6299 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 7.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
6<sect1 id="ch-system-hotplug" xreflabel="Hotplug" role="wrap">
7<title>Hotplug-&hotplug-version;</title>
8<?dbhtml filename="hotplug.html"?>
9
10<indexterm zone="ch-system-hotplug"><primary sortas="a-Hotplug">Hotplug</primary></indexterm>
11
12<sect2 role="package"><title/>
13<para>The Hotplug package contains scripts that react upon hotplug events
14generated by the kernel. Such events correspond to every change in the kernel
15state visible in the <systemitem class="filesystem">sysfs</systemitem>
16filesystem, e.g., the addition and removal of hardware. This package also
17detects existing hardware during boot and inserts the relevant modules into the
18running kernel.</para>
19
20<segmentedlist>
21<segtitle>&buildtime;</segtitle>
22<segtitle>&diskspace;</segtitle>
23<seglistitem><seg>0.01 SBU</seg><seg>460 KB</seg></seglistitem>
24</segmentedlist>
25
26<segmentedlist>
27<segtitle>&dependencies;</segtitle>
28<seglistitem><seg>Bash, Coreutils, Find, Gawk, and Make</seg></seglistitem>
29</segmentedlist>
30</sect2>
31
32<sect2 role="installation">
33<title>Installation of Hotplug</title>
34
35<para>Install the Hotplug package:</para>
36
37<screen><userinput>make install</userinput></screen>
38
39<para>Copy a file that the <quote>install</quote> target omits.</para>
40
41<screen><userinput>cp etc/hotplug/pnp.distmap /etc/hotplug</userinput></screen>
42
43<para>Remove the init script that Hotplug installs, since we're going to be
44using the script included with LFS-Bootscripts:</para>
45
46<screen><userinput>rm -rf /etc/init.d</userinput></screen>
47
48<para>Network device hotplugging is not supported by LFS-Bootscripts yet. For
49that reason, remove the network hotplug agent:</para>
50
51<screen><userinput>rm -f /etc/hotplug/net.agent</userinput></screen>
52
53<para>Create a directory for storing firmware that can be loaded by
54<command>hotplug</command>:</para>
55
56<screen><userinput>mkdir /lib/firmware</userinput></screen>
57
58</sect2>
59
60<sect2 id="contents-hotplug" role="content"><title>Contents of Hotplug</title>
61
62<segmentedlist>
63<segtitle>Installed program</segtitle>
64<segtitle>Installed scripts</segtitle>
65<segtitle>Installed files</segtitle>
66<seglistitem><seg>hotplug</seg>
67<seg>/etc/hotplug/*.rc, /etc/hotplug/*.agent</seg>
68<seg>/etc/hotplug/hotplug.functions, /etc/hotplug/blacklist, /etc/hotplug/{pci,usb},
69/etc/hotplug/usb.usermap, /etc/hotplug.d, and /var/log/hotplug/events</seg></seglistitem>
70</segmentedlist>
71
72<beginpage/>
73
74<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
75<?dbfo list-presentation="list"?>
76<?dbhtml list-presentation="table"?>
77
78<varlistentry id="hotplug">
79<term><command>hotplug</command></term>
80<listitem>
81<para>This script is called by default by the Linux kernel when something
82changes in its internal state (e.g., a new device is added or an existing device
83is removed)</para>
84<indexterm zone="ch-system-hotplug hotplug"><primary
85sortas="b-hotplug">hotplug</primary></indexterm>
86</listitem>
87</varlistentry>
88
89<varlistentry id="hotplug-rc">
90<term><command>/etc/hotplug/*.rc</command></term>
91<listitem>
92<para>These scripts are used for cold plugging, i.e., detecting and acting upon
93hardware already present during system startup. They are called by the
94<filename>hotplug</filename> initscript that comes from the LFS-Bootscripts
95package. The <command>*.rc</command> scripts try to recover hotplug events that
96were lost during system boot because, for example, the root filesystem was not
97mounted by the kernel</para>
98<indexterm zone="ch-system-hotplug hotplug-rc"><primary
99sortas="d-/etc/hotplug/*.rc">/etc/hotplug/*.rc</primary></indexterm>
100</listitem>
101</varlistentry>
102
103<varlistentry id="hotplug-agent">
104<term><command>/etc/hotplug/*.agent</command></term>
105<listitem>
106<para>These scripts are called by <command>hotplug</command>
107in response to different types of hotplug events generated by the kernel.
108Their action is to insert corresponding kernel modules and call any
109user-provided scripts</para>
110<indexterm zone="ch-system-hotplug hotplug-agent"><primary
111sortas="d-/etc/hotplug/*.agent">/etc/hotplug/*.agent</primary></indexterm>
112</listitem>
113</varlistentry>
114
115<varlistentry id="hotplug-blacklist">
116<term><filename>/etc/hotplug/blacklist</filename></term>
117<listitem>
118<para>This file contains the list of modules that should never be inserted into
119the kernel by the Hotplug scripts</para>
120<indexterm zone="ch-system-hotplug hotplug-blacklist"><primary
121sortas="e-/etc/hotplug/blacklist">/etc/hotplug/blacklist</primary></indexterm>
122</listitem>
123</varlistentry>
124
125<varlistentry id="hotplug-functions">
126<term><filename>/etc/hotplug/hotplug.functions</filename></term>
127<listitem>
128<para>This file contains common functions used by other scripts in the Hotplug
129package</para>
130<indexterm zone="ch-system-hotplug hotplug-functions"><primary
131sortas="e-/etc/hotplug/hotplug.functions">/etc/hotplug/hotplug.functions</primary></indexterm>
132</listitem>
133</varlistentry>
134
135<varlistentry id="hotplug-subdirs">
136<term><filename class="directory">/etc/hotplug/{pci,usb}</filename></term>
137<listitem>
138<para>These directories contain user-written handlers for hotplug events</para>
139<indexterm zone="ch-system-hotplug hotplug-subdirs"><primary
140sortas="e-/etc/hotplug/{pci,usb}">/etc/hotplug/{pci,usb}</primary></indexterm>
141</listitem>
142</varlistentry>
143
144<varlistentry id="hotplug-usb.usermap">
145<term><filename>/etc/hotplug/usb.usermap</filename></term>
146<listitem>
147<para>This file contains rules that determine which user-defined handlers to
148call for each USB device, based on its vendor ID and other attributes</para>
149<indexterm zone="ch-system-hotplug hotplug-usb.usermap"><primary
150sortas="e-/etc/hotplug/usb.usermap">/etc/hotplug/usb.usermap</primary></indexterm>
151</listitem>
152</varlistentry>
153
154<varlistentry id="hotplug-hotplug.d">
155<term><filename class="directory">/etc/hotplug.d</filename></term>
156<listitem>
157<para>This directory contains programs (or symlinks to them) that are interested
158in receiving hotplug events. For example, Udev puts its symlink here during
159installation</para>
160<indexterm zone="ch-system-hotplug hotplug-hotplug.d"><primary
161sortas="e-/etc/hotplug.d">/etc/hotplug.d</primary></indexterm>
162</listitem>
163</varlistentry>
164
165<varlistentry id="hotplug-firmware">
166<term><filename class="directory">/lib/firmware</filename></term>
167<listitem>
168<para>This directory contains the firmware for devices that need to have their
169firmware loaded before use</para>
170<indexterm zone="ch-system-hotplug hotplug-firmware"><primary
171sortas="e-/lib/firmware">/lib/firmware</primary></indexterm>
172</listitem>
173</varlistentry>
174
175<varlistentry id="hotplug-events">
176<term><filename>/var/log/hotplug/events</filename></term>
177<listitem>
178<para>This file contains all the events that <command>hotplug</command> has
179called since bootup</para>
180<indexterm zone="ch-system-hotplug hotplug-events"><primary
181sortas="e-/var/log/hotplug/events">/var/log/hotplug/events</primary></indexterm>
182</listitem>
183</varlistentry>
184
185</variablelist>
186</sect2>
187</sect1>
Note: See TracBrowser for help on using the repository browser.