source: final-system/common/hotplug.xml@ 48f8316

Last change on this file since 48f8316 was bf8c11f, checked in by Jim Gifford <clfs@…>, 19 years ago

r627@server (orig r625): jim | 2005-10-31 12:59:34 -0800
Import of Cross-LFS Book

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