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 | <para>The Hotplug package contains scripts that react upon hotplug events
|
---|
14 | generated by the kernel. Such events correspond to every change in the kernel
|
---|
15 | state visible in the <systemitem class="filesystem">sysfs</systemitem>
|
---|
16 | filesystem, e.g., the addition and removal of hardware. This package also
|
---|
17 | detects existing hardware during boot and inserts the relevant modules into the
|
---|
18 | running kernel.</para>
|
---|
19 |
|
---|
20 | <segmentedlist>
|
---|
21 | <segtitle>&buildtime;</segtitle>
|
---|
22 | <segtitle>&diskspace;</segtitle>
|
---|
23 | <seglistitem><seg>0.01 SBU</seg><seg>0.1 MB</seg></seglistitem>
|
---|
24 | </segmentedlist>
|
---|
25 |
|
---|
26 | <segmentedlist>
|
---|
27 | <segtitle>&dependencies;</segtitle>
|
---|
28 | <seglistitem><seg>Unchecked</seg></seglistitem>
|
---|
29 | </segmentedlist>
|
---|
30 | </sect2>
|
---|
31 |
|
---|
32 | <sect2 role="installation">
|
---|
33 | <title>Installation of Hotplug</title>
|
---|
34 |
|
---|
35 | <para>Install the Hotplug package:</para>
|
---|
36 |
|
---|
37 | <screen><userinput>make install</userinput></screen>
|
---|
38 |
|
---|
39 | <para>Copy a file that the <quote>install</quote> target omits.</para>
|
---|
40 |
|
---|
41 | <screen><userinput>cp etc/hotplug/pnp.distmap /etc/hotplug</userinput></screen>
|
---|
42 |
|
---|
43 | <para>Remove the init script that Hotplug installs, since we're going to be
|
---|
44 | using the script included with LFS-Bootscripts:</para>
|
---|
45 |
|
---|
46 | <screen><userinput>rm -rf /etc/init.d</userinput></screen>
|
---|
47 |
|
---|
48 | <para>Network device hotplugging is not supported by LFS bootscripts yet. For
|
---|
49 | that reason, remove the network hotplug agent:</para>
|
---|
50 |
|
---|
51 | <screen><userinput>rm -f /etc/hotplug/net.agent</userinput></screen>
|
---|
52 | </sect2>
|
---|
53 |
|
---|
54 |
|
---|
55 | <sect2 id="contents-hotplug" role="content"><title>Contents of Hotplug</title>
|
---|
56 |
|
---|
57 | <segmentedlist>
|
---|
58 | <segtitle>Installed program</segtitle>
|
---|
59 | <segtitle>Installed scripts</segtitle>
|
---|
60 | <segtitle>Installed files</segtitle>
|
---|
61 | <seglistitem><seg>hotplug</seg>
|
---|
62 | <seg>/etc/hotplug/*.rc, /etc/hotplug/*.agent</seg>
|
---|
63 | <seg>/etc/hotplug/hotplug.functions, /etc/hotplug/blacklist, /etc/hotplug/{pci,usb},
|
---|
64 | /etc/hotplug/usb.usermap, /etc/hotplug.d</seg></seglistitem>
|
---|
65 | </segmentedlist>
|
---|
66 |
|
---|
67 | <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
68 | <?dbfo list-presentation="list"?>
|
---|
69 | <?dbhtml list-presentation="table"?>
|
---|
70 |
|
---|
71 | <varlistentry id="hotplug">
|
---|
72 | <term><command>hotplug</command></term>
|
---|
73 | <listitem>
|
---|
74 | <indexterm zone="ch-system-hotplug hotplug"><primary
|
---|
75 | sortas="b-hotplug">hotplug</primary></indexterm>
|
---|
76 | <para>This script is called by default by Linux kernel when something
|
---|
77 | changes in its internal state (e.g., a new device is added or removed).</para>
|
---|
78 | </listitem>
|
---|
79 | </varlistentry>
|
---|
80 |
|
---|
81 | <varlistentry id="hotplug-rc">
|
---|
82 | <term><command>/etc/hotplug/*.rc</command></term>
|
---|
83 | <listitem>
|
---|
84 | <indexterm zone="ch-system-hotplug hotplug-rc"><primary
|
---|
85 | sortas="d-/etc/hotplug/*.rc">/etc/hotplug/*.rc</primary></indexterm>
|
---|
86 | <para>These scripts are used for cold plugging, i.e., detection and other
|
---|
87 | specific actions upon hardware already present during system startup.
|
---|
88 | They are called by the <filename>hotplug</filename> initscript that comes
|
---|
89 | from the LFS-Bootscripts package.
|
---|
90 | The <command>*.rc</command>
|
---|
91 | scripts try to recover hotplug events that were lost during system boot
|
---|
92 | because, e.g., the root filesystem was not mounted by the kernel.
|
---|
93 | </para>
|
---|
94 | </listitem>
|
---|
95 | </varlistentry>
|
---|
96 |
|
---|
97 | <varlistentry id="hotplug-agent">
|
---|
98 | <term><command>/etc/hotplug/*.agent</command></term>
|
---|
99 | <listitem>
|
---|
100 | <indexterm zone="ch-system-hotplug hotplug-agent"><primary
|
---|
101 | sortas="d-/etc/hotplug/*.agent">/etc/hotplug/*.agent</primary></indexterm>
|
---|
102 | <para>These scripts are called by <command>hotplug</command>
|
---|
103 | in response to different types of hotplug events generated by the kernel.
|
---|
104 | Their action is to insert corresponding kernel modules and call user-provided
|
---|
105 | scripts, if any.
|
---|
106 | </para>
|
---|
107 | </listitem>
|
---|
108 | </varlistentry>
|
---|
109 |
|
---|
110 | <varlistentry id="hotplug-functions">
|
---|
111 | <term><filename>/etc/hotplug/hotplug.functions</filename></term>
|
---|
112 | <listitem>
|
---|
113 | <indexterm zone="ch-system-hotplug hotplug-functions"><primary
|
---|
114 | sortas="e-/etc/hotplug/hotplug.functions">/etc/hotplug/hotplug.functions</primary></indexterm>
|
---|
115 | <para>This file contains common functions used by other scripts in Hotplug
|
---|
116 | package.
|
---|
117 | </para>
|
---|
118 | </listitem>
|
---|
119 | </varlistentry>
|
---|
120 |
|
---|
121 | <varlistentry id="hotplug-blacklist">
|
---|
122 | <term><filename>/etc/hotplug/blacklist</filename></term>
|
---|
123 | <listitem>
|
---|
124 | <indexterm zone="ch-system-hotplug hotplug-blacklist"><primary
|
---|
125 | sortas="e-/etc/hotplug/blacklist">/etc/hotplug/blacklist</primary></indexterm>
|
---|
126 | <para>This file contains the list of modules that should never be
|
---|
127 | inserted into the kernel by hotplug scripts.
|
---|
128 | </para>
|
---|
129 | </listitem>
|
---|
130 | </varlistentry>
|
---|
131 |
|
---|
132 | <varlistentry id="hotplug-subdirs">
|
---|
133 | <term><filename class="directory">/etc/hotplug/{pci,usb}</filename></term>
|
---|
134 | <listitem>
|
---|
135 | <indexterm zone="ch-system-hotplug hotplug-subdirs"><primary
|
---|
136 | sortas="e-/etc/hotplug/{pci,usb}">/etc/hotplug/{pci,usb}</primary></indexterm>
|
---|
137 | <para>These directories are supposed to contain user-written handlers for
|
---|
138 | hotplug events.
|
---|
139 | </para>
|
---|
140 | </listitem>
|
---|
141 | </varlistentry>
|
---|
142 |
|
---|
143 | <varlistentry id="hotplug-usb.usermap">
|
---|
144 | <term><filename>/etc/hotplug/usb.usermap</filename></term>
|
---|
145 | <listitem>
|
---|
146 | <indexterm zone="ch-system-hotplug hotplug-usb.usermap"><primary
|
---|
147 | sortas="e-/etc/hotplug/usb.usermap">/etc/hotplug/usb.usermap</primary></indexterm>
|
---|
148 | <para>This file contains rules that determine which user-defined handlers to
|
---|
149 | call for each USB device, based on its vendor, id and other attributes.
|
---|
150 | </para>
|
---|
151 | </listitem>
|
---|
152 | </varlistentry>
|
---|
153 |
|
---|
154 | <varlistentry id="hotplug-hotplug.d">
|
---|
155 | <term><filename class="directory">/etc/hotplug.d</filename></term>
|
---|
156 | <listitem>
|
---|
157 | <indexterm zone="ch-system-hotplug hotplug-hotplug.d"><primary
|
---|
158 | sortas="e-/etc/hotplug.d">/etc/hotplug.d</primary></indexterm>
|
---|
159 | <para>This directory contains programs (or symlinks to them)
|
---|
160 | that are interested in receiving hotplug events. E.g.,
|
---|
161 | <application>Udev</application> puts its symlink here during installation.
|
---|
162 | </para>
|
---|
163 | </listitem>
|
---|
164 | </varlistentry>
|
---|
165 | </variablelist>
|
---|
166 | </sect2>
|
---|
167 | </sect1>
|
---|