source: chapter06/hotplug.xml@ 0a5b773

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 12.2 12.2-rc1 6.1 6.1.1 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/loongarch-12.2 xry111/mips64el xry111/multilib xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 0a5b773 was 787440b0, checked in by Matthew Burgess <matthew@…>, 20 years ago

Reorder the descriptions of files and directories installed by hotplug

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

  • Property mode set to 100644
File size: 7.2 KB
RevLine 
[72b0264]1<?xml version="1.0" encoding="ISO-8859-1"?>
[1770019]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
[72b0264]3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
[bad0dd1]6<sect1 id="ch-system-hotplug" xreflabel="Hotplug" role="wrap">
[72b0264]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/>
[81fd230]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>
[72b0264]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
[81fd230]26<segmentedlist>
[45992ae]27<segtitle>&dependencies;</segtitle>
[81fd230]28<seglistitem><seg>Unchecked</seg></seglistitem>
29</segmentedlist>
[72b0264]30</sect2>
31
32<sect2 role="installation">
33<title>Installation of Hotplug</title>
34
[e2a70be]35<para>Install the Hotplug package:</para>
[72b0264]36
37<screen><userinput>make install</userinput></screen>
38
[81fd230]39<para>Copy a file that the <quote>install</quote> target omits.</para>
[7ca72d4]40
41<screen><userinput>cp etc/hotplug/pnp.distmap /etc/hotplug</userinput></screen>
42
[81fd230]43<para>Remove the init script that Hotplug installs, since we're going to be
44using the script included with LFS-Bootscripts:</para>
[72b0264]45
[bad0dd1]46<screen><userinput>rm -rf /etc/init.d</userinput></screen>
[72b0264]47
[81fd230]48<para>Network device hotplugging is not supported by LFS bootscripts yet. For
49that reason, remove the network hotplug agent:</para>
[3f91a9c]50
51<screen><userinput>rm -f /etc/hotplug/net.agent</userinput></screen>
[6d87f47]52
53<para>For logging of hotplug events we will create a directory and a
54blank file. This file will show all the information passed to hotplug:</para>
55
56<screen><userinput>mkdir /var/log/hotplug
57touch /var/log/hotplug/events</userinput></screen>
58
59<para>For firmware to be loaded by hotplug we will create the necessary
60directory:</para>
61
62<screen><userinput>mkdir /lib/firmware</userinput></screen>
63
[72b0264]64</sect2>
65
66
67<sect2 id="contents-hotplug" role="content"><title>Contents of Hotplug</title>
68
[81fd230]69<segmentedlist>
70<segtitle>Installed program</segtitle>
71<segtitle>Installed scripts</segtitle>
72<segtitle>Installed files</segtitle>
73<seglistitem><seg>hotplug</seg>
74<seg>/etc/hotplug/*.rc, /etc/hotplug/*.agent</seg>
75<seg>/etc/hotplug/hotplug.functions, /etc/hotplug/blacklist, /etc/hotplug/{pci,usb},
[6d87f47]76/etc/hotplug/usb.usermap, /etc/hotplug.d, /var/log/hotplug/events</seg></seglistitem>
[81fd230]77</segmentedlist>
[72b0264]78
[81fd230]79<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
80<?dbfo list-presentation="list"?>
[8f97096]81<?dbhtml list-presentation="table"?>
[81fd230]82
83<varlistentry id="hotplug">
84<term><command>hotplug</command></term>
85<listitem>
86<indexterm zone="ch-system-hotplug hotplug"><primary
87sortas="b-hotplug">hotplug</primary></indexterm>
[c59fe13]88<para>This script is called by default by the Linux kernel when something
[81fd230]89changes in its internal state (e.g., a new device is added or removed).</para>
90</listitem>
91</varlistentry>
92
93<varlistentry id="hotplug-rc">
94<term><command>/etc/hotplug/*.rc</command></term>
95<listitem>
96<indexterm zone="ch-system-hotplug hotplug-rc"><primary
97sortas="d-/etc/hotplug/*.rc">/etc/hotplug/*.rc</primary></indexterm>
[c59fe13]98<para>These scripts are used for cold plugging, i.e., detecting and acting upon
99hardware already present during system startup. They are called by the
100<filename>hotplug</filename> initscript that comes from the LFS-Bootscripts
101package. The <command>*.rc</command> scripts try to recover hotplug events that
102were lost during system boot because, for example, the root filesystem was not
103mounted by the kernel.</para>
[81fd230]104</listitem>
105</varlistentry>
106
107<varlistentry id="hotplug-agent">
108<term><command>/etc/hotplug/*.agent</command></term>
109<listitem>
110<indexterm zone="ch-system-hotplug hotplug-agent"><primary
111sortas="d-/etc/hotplug/*.agent">/etc/hotplug/*.agent</primary></indexterm>
112<para>These scripts are called by <command>hotplug</command>
113in response to different types of hotplug events generated by the kernel.
[c59fe13]114Their action is to insert corresponding kernel modules and call any
115user-provided scripts.
[81fd230]116</para>
117</listitem>
118</varlistentry>
119
120<varlistentry id="hotplug-blacklist">
121<term><filename>/etc/hotplug/blacklist</filename></term>
122<listitem>
123<indexterm zone="ch-system-hotplug hotplug-blacklist"><primary
124sortas="e-/etc/hotplug/blacklist">/etc/hotplug/blacklist</primary></indexterm>
[c59fe13]125<para>This file contains the list of modules that should never be inserted into
126the kernel by the hotplug scripts.
[81fd230]127</para>
128</listitem>
129</varlistentry>
130
[787440b0]131<varlistentry id="hotplug-functions">
132<term><filename>/etc/hotplug/hotplug.functions</filename></term>
133<listitem>
134<indexterm zone="ch-system-hotplug hotplug-functions"><primary
135sortas="e-/etc/hotplug/hotplug.functions">/etc/hotplug/hotplug.functions</primary></indexterm>
136<para>This file contains common functions used by other scripts in the Hotplug
137package.
138</para>
139</listitem>
140</varlistentry>
141
[81fd230]142<varlistentry id="hotplug-subdirs">
143<term><filename class="directory">/etc/hotplug/{pci,usb}</filename></term>
144<listitem>
145<indexterm zone="ch-system-hotplug hotplug-subdirs"><primary
146sortas="e-/etc/hotplug/{pci,usb}">/etc/hotplug/{pci,usb}</primary></indexterm>
[c59fe13]147<para>These directories contain user-written handlers for hotplug events.
[81fd230]148</para>
149</listitem>
150</varlistentry>
151
152<varlistentry id="hotplug-usb.usermap">
153<term><filename>/etc/hotplug/usb.usermap</filename></term>
154<listitem>
155<indexterm zone="ch-system-hotplug hotplug-usb.usermap"><primary
156sortas="e-/etc/hotplug/usb.usermap">/etc/hotplug/usb.usermap</primary></indexterm>
157<para>This file contains rules that determine which user-defined handlers to
[c59fe13]158call for each USB device, based on its vendor ID and other attributes.
[81fd230]159</para>
160</listitem>
161</varlistentry>
162
163<varlistentry id="hotplug-hotplug.d">
164<term><filename class="directory">/etc/hotplug.d</filename></term>
165<listitem>
166<indexterm zone="ch-system-hotplug hotplug-hotplug.d"><primary
167sortas="e-/etc/hotplug.d">/etc/hotplug.d</primary></indexterm>
[c59fe13]168<para>This directory contains programs (or symlinks to them) that are interested
169in receiving hotplug events. For example, <application>Udev</application> puts
170its symlink here during installation.</para>
[81fd230]171</listitem>
172</varlistentry>
[6d87f47]173
174<varlistentry id="hotplug-firmware">
175<term><filename class="directory">/lib/firmware</filename></term>
176<listitem>
177<indexterm zone="ch-system-hotplug hotplug-firmware"><primary
178sortas="e-/lib/firmware">/lib/firmware</primary></indexterm>
[c59fe13]179<para>This directory contains the firmware for devices that need to have their
180firmware loaded before use.</para>
[6d87f47]181</listitem>
182</varlistentry>
183
[787440b0]184<varlistentry id="hotplug-events">
185<term><filename>/var/log/hotplug/events</filename></term>
186<listitem>
187<indexterm zone="ch-system-hotplug hotplug-events"><primary
188sortas="e-/var/log/hotplug/events">/var/log/hotplug/events</primary></indexterm>
189<para>This file contains all the events that hotplug has called since bootup.
190</para>
191</listitem>
192</varlistentry>
193
[81fd230]194</variablelist>
[a4dadad2]195</sect2>
[72b0264]196</sect1>
Note: See TracBrowser for help on using the repository browser.