source: chapter06/hotplug.xml@ 74314cc

Last change on this file since 74314cc was 7aa9d59, checked in by Jim Gifford <jim@…>, 20 years ago

Multiple updates: udev 054, findutils 4.2.19, psmisc 21.6 and hotplug. Passwd file correction

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multi-arch/BOOK@4739 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 %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
14is taken verbatim from Unstable -->
15<para>The Hotplug package contains scripts that react upon hotplug events
16generated by the kernel. Such events correspond to every change in the
17in the kernel state visible in the <systemitem class="filesystem">sysfs</systemitem>
18filesystem, e.g., the addition and removal of hardware. This package also detects
19existing 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
41the 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
46that 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
51blank file. This file will show all the information passed to hotplug:</para>
52
53<screen><userinput>mkdir /var/log/hotplug
54touch /var/log/hotplug/events</userinput></screen>
55
56<para>For firmware to be loaded by hotplug we will create the necessary
57directory:</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
84sortas="b-hotplug">hotplug</primary></indexterm>
85<para>This script is called by default by Linux kernel when something
86changes 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
94sortas="d-/etc/hotplug/*.rc">/etc/hotplug/*.rc</primary></indexterm>
95<para>These scripts are used for cold plugging, i.e., detection and other
96specific actions upon hardware already present during system startup.
97They are called by the <filename>hotplug</filename> initscript that comes
98from the LFS-Bootscripts package.
99The <command>*.rc</command>
100scripts try to recover hotplug events that were lost during system boot
101because, e.g., the root filesystem was not mounted by the kernel.
102</para>
103</listitem>
104</varlistentry>
105
106<varlistentry id="hotplug-agent">
107<term><command>/etc/hotplug/*.agent</command></term>
108<listitem>
109<indexterm zone="ch-system-hotplug hotplug-agent"><primary
110sortas="d-/etc/hotplug/*.agent">/etc/hotplug/*.agent</primary></indexterm>
111<para>These scripts are called by <command>hotplug</command>
112in response to different types of hotplug events generated by the kernel.
113Their action is to insert corresponding kernel modules and call user-provided
114scripts, if any.
115</para>
116</listitem>
117</varlistentry>
118
119<varlistentry id="hotplug-functions">
120<term><filename>/etc/hotplug/hotplug.functions</filename></term>
121<listitem>
122<indexterm zone="ch-system-hotplug hotplug-functions"><primary
123sortas="e-/etc/hotplug/hotplug.functions">/etc/hotplug/hotplug.functions</primary></indexterm>
124<para>This file contains common functions used by other scripts in Hotplug
125package.
126</para>
127</listitem>
128</varlistentry>
129
130<varlistentry id="hotplug-blacklist">
131<term><filename>/etc/hotplug/blacklist</filename></term>
132<listitem>
133<indexterm zone="ch-system-hotplug hotplug-blacklist"><primary
134sortas="e-/etc/hotplug/blacklist">/etc/hotplug/blacklist</primary></indexterm>
135<para>This file contains the list of modules that should never be
136inserted into the kernel by hotplug scripts.
137</para>
138</listitem>
139</varlistentry>
140
141<varlistentry id="hotplug-subdirs">
142<term><filename class="directory">/etc/hotplug/{pci,usb}</filename></term>
143<listitem>
144<indexterm zone="ch-system-hotplug hotplug-subdirs"><primary
145sortas="e-/etc/hotplug/{pci,usb}">/etc/hotplug/{pci,usb}</primary></indexterm>
146<para>These directories are supposed to contain user-written handlers for
147hotplug events.
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
158call for each USB device, based on its vendor, id and other attributes.
159</para>
160</listitem>
161</varlistentry>
162
163<varlistentry id="hotplug-events">
164<term><filename>/var/log/hotplug/events</filename></term>
165<listitem>
166<indexterm zone="ch-system-hotplug events"><primary
167sortas="e-/var/log/hotplug/events">/var/log/hotplug/events</primary></indexterm>
168<para>This file contains all the events since bootup that hotplug has called.
169</para>
170</listitem>
171</varlistentry>
172
173<varlistentry id="hotplug-hotplug.d">
174<term><filename class="directory">/etc/hotplug.d</filename></term>
175<listitem>
176<indexterm zone="ch-system-hotplug hotplug-hotplug.d"><primary
177sortas="e-/etc/hotplug.d">/etc/hotplug.d</primary></indexterm>
178<para>This directory contains programs (or symlinks to them)
179that are interested in receiving hotplug events. E.g.,
180<application>Udev</application> puts its symlink here during installation.
181</para>
182</listitem>
183</varlistentry>
184
185<varlistentry id="hotplug-firmware">
186<term><filename class="directory">/lib/firmware</filename></term>
187<listitem>
188<indexterm zone="ch-system-hotplug hotplug-firmware"><primary
189sortas="e-/lib/firmware">/lib/firmware</primary></indexterm>
190<para>This directory contains the firmware for devices that
191need to have there firmware loaded before use.
192</para>
193</listitem>
194</varlistentry>
195
196</variablelist>
197</sect2>
198</sect1>
Note: See TracBrowser for help on using the repository browser.