source: chapter06/hotplug.xml@ 4e577add

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 4e577add was 81f1289, checked in by Matthew Burgess <matthew@…>, 19 years ago

Revert r7195 - committed by mistake

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7196 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

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