source: chapter06/hotplug.xml@ 2541f73

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 2541f73 was 2541f73, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago

Moved indexterm tags to their proper places.

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

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