source: chapter06/hotplug.xml@ 386babed

Last change on this file since 386babed was 386babed, checked in by Jim Gifford <jim@…>, 19 years ago

Hotplug change by Matt

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multi-arch/BOOK@4874 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<!-- Edit me - The entire text of this section needs to be proofread, as it
14is taken verbatim from Unstable -->
15<para>The Hotplug package contains scripts that react upon hotplug events
16generated by the kernel. Such events correspond to every change in the
17in the kernel state visible in the <systemitem class="filesystem">sysfs</systemitem>
18filesystem, e.g., the addition and removal of hardware. This package also detects
19existing hardware during boot and inserts the relevant modules into the running kernel.</para>
20
21<segmentedlist>
22<segtitle>&buildtime;</segtitle>
23<segtitle>&diskspace;</segtitle>
24<seglistitem><seg>0.01 SBU</seg><seg>0.1 MB</seg></seglistitem>
25</segmentedlist>
26
27<segmentedlist>
28<segtitle>&dependencies;</segtitle>
29<seglistitem><seg>Unchecked</seg></seglistitem>
30</segmentedlist>
31</sect2>
32
33<sect2 role="installation">
34<title>Installation of Hotplug</title>
35
36<para>Install the Hotplug package:</para>
37
38<screen><userinput>make install</userinput></screen>
39
40<para>Remove Hotplug's not-so-clean init script, since we're going to be using
41the script including with LFS-Bootscripts:</para>
42
43<screen><userinput>rm -rf /etc/init.d</userinput></screen>
44
45<para>Network device hotplugging is not supported by LFS bootscripts yet. For
46that reason, remove the network hotplug agent:</para>
47
48<screen><userinput>rm -f /etc/hotplug/net.agent</userinput></screen>
49
50<para>Create a file that is necessary for the logging of hotplug events:</para>
51
52<screen><userinput>touch /var/log/hotplug/events</userinput></screen>
53
54<para>Create a directory for storing firmware that can be loaded by hotplug:</para>
55
56<screen><userinput>mkdir /lib/firmware</userinput></screen>
57
58</sect2>
59
60
61<sect2 id="contents-hotplug" role="content"><title>Contents of Hotplug</title>
62
63<segmentedlist>
64<segtitle>Installed program</segtitle>
65<segtitle>Installed scripts</segtitle>
66<segtitle>Installed files</segtitle>
67<seglistitem><seg>hotplug</seg>
68<seg>/etc/hotplug/*.rc, /etc/hotplug/*.agent</seg>
69<seg>/etc/hotplug/hotplug.functions, /etc/hotplug/blacklist, /etc/hotplug/{pci,usb},
70/etc/hotplug/usb.usermap, /etc/hotplug.d, /var/log/hotplug/events</seg></seglistitem>
71</segmentedlist>
72
73<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
74<?dbfo list-presentation="list"?>
75<?dbhtml list-presentation="table"?>
76
77<varlistentry id="hotplug">
78<term><command>hotplug</command></term>
79<listitem>
80<indexterm zone="ch-system-hotplug hotplug"><primary
81sortas="b-hotplug">hotplug</primary></indexterm>
82<para>This script is called by default by the Linux kernel when something
83changes in its internal state (e.g., a new device is added or removed).</para>
84</listitem>
85</varlistentry>
86
87<varlistentry id="hotplug-rc">
88<term><command>/etc/hotplug/*.rc</command></term>
89<listitem>
90<indexterm zone="ch-system-hotplug hotplug-rc"><primary
91sortas="d-/etc/hotplug/*.rc">/etc/hotplug/*.rc</primary></indexterm>
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</listitem>
99</varlistentry>
100
101<varlistentry id="hotplug-agent">
102<term><command>/etc/hotplug/*.agent</command></term>
103<listitem>
104<indexterm zone="ch-system-hotplug hotplug-agent"><primary
105sortas="d-/etc/hotplug/*.agent">/etc/hotplug/*.agent</primary></indexterm>
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.
110</para>
111</listitem>
112</varlistentry>
113
114<varlistentry id="hotplug-blacklist">
115<term><filename>/etc/hotplug/blacklist</filename></term>
116<listitem>
117<indexterm zone="ch-system-hotplug hotplug-blacklist"><primary
118sortas="e-/etc/hotplug/blacklist">/etc/hotplug/blacklist</primary></indexterm>
119<para>This file contains the list of modules that should never be inserted into
120the kernel by the hotplug scripts.
121</para>
122</listitem>
123</varlistentry>
124
125<varlistentry id="hotplug-functions">
126<term><filename>/etc/hotplug/hotplug.functions</filename></term>
127<listitem>
128<indexterm zone="ch-system-hotplug hotplug-functions"><primary
129sortas="e-/etc/hotplug/hotplug.functions">/etc/hotplug/hotplug.functions</primary></indexterm>
130<para>This file contains common functions used by other scripts in the Hotplug
131package.
132</para>
133</listitem>
134</varlistentry>
135
136<varlistentry id="hotplug-subdirs">
137<term><filename class="directory">/etc/hotplug/{pci,usb}</filename></term>
138<listitem>
139<indexterm zone="ch-system-hotplug hotplug-subdirs"><primary
140sortas="e-/etc/hotplug/{pci,usb}">/etc/hotplug/{pci,usb}</primary></indexterm>
141<para>These directories contain user-written handlers for hotplug events.
142</para>
143</listitem>
144</varlistentry>
145
146<varlistentry id="hotplug-usb.usermap">
147<term><filename>/etc/hotplug/usb.usermap</filename></term>
148<listitem>
149<indexterm zone="ch-system-hotplug hotplug-usb.usermap"><primary
150sortas="e-/etc/hotplug/usb.usermap">/etc/hotplug/usb.usermap</primary></indexterm>
151<para>This file contains rules that determine which user-defined handlers to
152call for each USB device, based on its vendor ID and other attributes.
153</para>
154</listitem>
155</varlistentry>
156
157<varlistentry id="hotplug-hotplug.d">
158<term><filename class="directory">/etc/hotplug.d</filename></term>
159<listitem>
160<indexterm zone="ch-system-hotplug hotplug-hotplug.d"><primary
161sortas="e-/etc/hotplug.d">/etc/hotplug.d</primary></indexterm>
162<para>This directory contains programs (or symlinks to them) that are interested
163in receiving hotplug events. For example, <application>Udev</application> puts
164its symlink here during installation.</para>
165</listitem>
166</varlistentry>
167
168<varlistentry id="hotplug-firmware">
169<term><filename class="directory">/lib/firmware</filename></term>
170<listitem>
171<indexterm zone="ch-system-hotplug hotplug-firmware"><primary
172sortas="e-/lib/firmware">/lib/firmware</primary></indexterm>
173<para>This directory contains the firmware for devices that need to have their
174firmware loaded before use.</para>
175</listitem>
176</varlistentry>
177
178<varlistentry id="hotplug-events">
179<term><filename>/var/log/hotplug/events</filename></term>
180<listitem>
181<indexterm zone="ch-system-hotplug hotplug-events"><primary
182sortas="e-/var/log/hotplug/events">/var/log/hotplug/events</primary></indexterm>
183<para>This file contains all the events that hotplug has called since bootup.
184</para>
185</listitem>
186</varlistentry>
187
188</variablelist>
189</sect2>
190</sect1>
Note: See TracBrowser for help on using the repository browser.