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