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
|
---|
14 | is taken verbatim from Unstable -->
|
---|
15 | <para>The Hotplug package contains scripts that react upon hotplug events
|
---|
16 | generated by the kernel. Such events correspond to every change in the
|
---|
17 | in the kernel state visible in the <systemitem class="filesystem">sysfs</systemitem>
|
---|
18 | filesystem, e.g., the addition and removal of hardware. This package also detects
|
---|
19 | existing 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
|
---|
41 | the 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
|
---|
46 | that reason, remove the network hotplug agent:</para>
|
---|
47 |
|
---|
48 | <screen><userinput>rm -f /etc/hotplug/net.agent</userinput></screen>
|
---|
49 |
|
---|
50 | <para>For logging of hotplug events we will create a directory and a
|
---|
51 | blank file. This file will show all the information passed to hotplug:</para>
|
---|
52 |
|
---|
53 | <screen><userinput>mkdir /var/log/hotplug
|
---|
54 | touch /var/log/hotplug/events</userinput></screen>
|
---|
55 |
|
---|
56 | <para>For firmware to be loaded by hotplug we will create the necessary
|
---|
57 | directory:</para>
|
---|
58 |
|
---|
59 | <screen><userinput>mkdir /lib/firmware</userinput></screen>
|
---|
60 |
|
---|
61 | </sect2>
|
---|
62 |
|
---|
63 |
|
---|
64 | <sect2 id="contents-hotplug" role="content"><title>Contents of Hotplug</title>
|
---|
65 |
|
---|
66 | <segmentedlist>
|
---|
67 | <segtitle>Installed program</segtitle>
|
---|
68 | <segtitle>Installed scripts</segtitle>
|
---|
69 | <segtitle>Installed files</segtitle>
|
---|
70 | <seglistitem><seg>hotplug</seg>
|
---|
71 | <seg>/etc/hotplug/*.rc, /etc/hotplug/*.agent</seg>
|
---|
72 | <seg>/etc/hotplug/hotplug.functions, /etc/hotplug/blacklist, /etc/hotplug/{pci,usb},
|
---|
73 | /etc/hotplug/usb.usermap, /etc/hotplug.d, /var/log/hotplug/events</seg></seglistitem>
|
---|
74 | </segmentedlist>
|
---|
75 |
|
---|
76 | <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
77 | <?dbfo list-presentation="list"?>
|
---|
78 | <?dbhtml list-presentation="table"?>
|
---|
79 |
|
---|
80 | <varlistentry id="hotplug">
|
---|
81 | <term><command>hotplug</command></term>
|
---|
82 | <listitem>
|
---|
83 | <indexterm zone="ch-system-hotplug hotplug"><primary
|
---|
84 | sortas="b-hotplug">hotplug</primary></indexterm>
|
---|
85 | <para>This script is called by default by the Linux kernel when something
|
---|
86 | changes in its internal state (e.g., a new device is added or removed).</para>
|
---|
87 | </listitem>
|
---|
88 | </varlistentry>
|
---|
89 |
|
---|
90 | <varlistentry id="hotplug-rc">
|
---|
91 | <term><command>/etc/hotplug/*.rc</command></term>
|
---|
92 | <listitem>
|
---|
93 | <indexterm zone="ch-system-hotplug hotplug-rc"><primary
|
---|
94 | sortas="d-/etc/hotplug/*.rc">/etc/hotplug/*.rc</primary></indexterm>
|
---|
95 | <para>These scripts are used for cold plugging, i.e., detecting and acting upon
|
---|
96 | hardware already present during system startup. They are called by the
|
---|
97 | <filename>hotplug</filename> initscript that comes from the LFS-Bootscripts
|
---|
98 | package. The <command>*.rc</command> scripts try to recover hotplug events that
|
---|
99 | were lost during system boot because, for example, the root filesystem was not
|
---|
100 | mounted by the kernel.</para>
|
---|
101 | </listitem>
|
---|
102 | </varlistentry>
|
---|
103 |
|
---|
104 | <varlistentry id="hotplug-agent">
|
---|
105 | <term><command>/etc/hotplug/*.agent</command></term>
|
---|
106 | <listitem>
|
---|
107 | <indexterm zone="ch-system-hotplug hotplug-agent"><primary
|
---|
108 | sortas="d-/etc/hotplug/*.agent">/etc/hotplug/*.agent</primary></indexterm>
|
---|
109 | <para>These scripts are called by <command>hotplug</command>
|
---|
110 | in response to different types of hotplug events generated by the kernel.
|
---|
111 | Their action is to insert corresponding kernel modules and call any
|
---|
112 | user-provided scripts.
|
---|
113 | </para>
|
---|
114 | </listitem>
|
---|
115 | </varlistentry>
|
---|
116 |
|
---|
117 | <varlistentry id="hotplug-blacklist">
|
---|
118 | <term><filename>/etc/hotplug/blacklist</filename></term>
|
---|
119 | <listitem>
|
---|
120 | <indexterm zone="ch-system-hotplug hotplug-blacklist"><primary
|
---|
121 | sortas="e-/etc/hotplug/blacklist">/etc/hotplug/blacklist</primary></indexterm>
|
---|
122 | <para>This file contains the list of modules that should never be inserted into
|
---|
123 | the kernel by the hotplug scripts.
|
---|
124 | </para>
|
---|
125 | </listitem>
|
---|
126 | </varlistentry>
|
---|
127 |
|
---|
128 | <varlistentry id="hotplug-functions">
|
---|
129 | <term><filename>/etc/hotplug/hotplug.functions</filename></term>
|
---|
130 | <listitem>
|
---|
131 | <indexterm zone="ch-system-hotplug hotplug-functions"><primary
|
---|
132 | sortas="e-/etc/hotplug/hotplug.functions">/etc/hotplug/hotplug.functions</primary></indexterm>
|
---|
133 | <para>This file contains common functions used by other scripts in the Hotplug
|
---|
134 | package.
|
---|
135 | </para>
|
---|
136 | </listitem>
|
---|
137 | </varlistentry>
|
---|
138 |
|
---|
139 | <varlistentry id="hotplug-subdirs">
|
---|
140 | <term><filename class="directory">/etc/hotplug/{pci,usb}</filename></term>
|
---|
141 | <listitem>
|
---|
142 | <indexterm zone="ch-system-hotplug hotplug-subdirs"><primary
|
---|
143 | sortas="e-/etc/hotplug/{pci,usb}">/etc/hotplug/{pci,usb}</primary></indexterm>
|
---|
144 | <para>These directories contain user-written handlers for hotplug events.
|
---|
145 | </para>
|
---|
146 | </listitem>
|
---|
147 | </varlistentry>
|
---|
148 |
|
---|
149 | <varlistentry id="hotplug-usb.usermap">
|
---|
150 | <term><filename>/etc/hotplug/usb.usermap</filename></term>
|
---|
151 | <listitem>
|
---|
152 | <indexterm zone="ch-system-hotplug hotplug-usb.usermap"><primary
|
---|
153 | sortas="e-/etc/hotplug/usb.usermap">/etc/hotplug/usb.usermap</primary></indexterm>
|
---|
154 | <para>This file contains rules that determine which user-defined handlers to
|
---|
155 | call for each USB device, based on its vendor ID and other attributes.
|
---|
156 | </para>
|
---|
157 | </listitem>
|
---|
158 | </varlistentry>
|
---|
159 |
|
---|
160 | <varlistentry id="hotplug-hotplug.d">
|
---|
161 | <term><filename class="directory">/etc/hotplug.d</filename></term>
|
---|
162 | <listitem>
|
---|
163 | <indexterm zone="ch-system-hotplug hotplug-hotplug.d"><primary
|
---|
164 | sortas="e-/etc/hotplug.d">/etc/hotplug.d</primary></indexterm>
|
---|
165 | <para>This directory contains programs (or symlinks to them) that are interested
|
---|
166 | in receiving hotplug events. For example, <application>Udev</application> puts
|
---|
167 | its symlink here during installation.</para>
|
---|
168 | </listitem>
|
---|
169 | </varlistentry>
|
---|
170 |
|
---|
171 | <varlistentry id="hotplug-firmware">
|
---|
172 | <term><filename class="directory">/lib/firmware</filename></term>
|
---|
173 | <listitem>
|
---|
174 | <indexterm zone="ch-system-hotplug hotplug-firmware"><primary
|
---|
175 | sortas="e-/lib/firmware">/lib/firmware</primary></indexterm>
|
---|
176 | <para>This directory contains the firmware for devices that need to have their
|
---|
177 | firmware loaded before use.</para>
|
---|
178 | </listitem>
|
---|
179 | </varlistentry>
|
---|
180 |
|
---|
181 | <varlistentry id="hotplug-events">
|
---|
182 | <term><filename>/var/log/hotplug/events</filename></term>
|
---|
183 | <listitem>
|
---|
184 | <indexterm zone="ch-system-hotplug hotplug-events"><primary
|
---|
185 | sortas="e-/var/log/hotplug/events">/var/log/hotplug/events</primary></indexterm>
|
---|
186 | <para>This file contains all the events that hotplug has called since bootup.
|
---|
187 | </para>
|
---|
188 | </listitem>
|
---|
189 | </varlistentry>
|
---|
190 |
|
---|
191 | </variablelist>
|
---|
192 | </sect2>
|
---|
193 | </sect1>
|
---|