source: BOOK/final-system/common/hotplug.xml@ fac77fb

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since fac77fb was e3a1e522, checked in by Jim Gifford <clfs@…>, 19 years ago

r981@server (orig r979): jim | 2005-12-30 10:11:32 -0800

r1226@server: cstaub | 2005-12-30 08:35:37 -0800
Updated package deps, removed explanation of cross-compiling from final-system binutils, and removed note about GRUB's testsuite failure


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