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