source: chapter06/hotplug.xml@ 78a9585c

Last change on this file since 78a9585c was 78a9585c, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago

Tag fix, sorry.

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

  • Property mode set to 100644
File size: 6.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>0.1 MB</seg></seglistitem>
24</segmentedlist>
25
26<segmentedlist>
27<segtitle>Hotplug installation depends on</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
44using 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
49that 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
70<varlistentry id="hotplug">
71<term><command>hotplug</command></term>
72<listitem>
73<indexterm zone="ch-system-hotplug hotplug"><primary
74sortas="b-hotplug">hotplug</primary></indexterm>
75<para>This script is called by default by Linux kernel when something
76changes in its internal state (e.g., a new device is added or removed).</para>
77</listitem>
78</varlistentry>
79
80<varlistentry id="hotplug-rc">
81<term><command>/etc/hotplug/*.rc</command></term>
82<listitem>
83<indexterm zone="ch-system-hotplug hotplug-rc"><primary
84sortas="d-/etc/hotplug/*.rc">/etc/hotplug/*.rc</primary></indexterm>
85<para>These scripts are used for cold plugging, i.e., detection and other
86specific actions upon hardware already present during system startup.
87They are called by the <filename>hotplug</filename> initscript that comes
88from the LFS-Bootscripts package.
89The <command>*.rc</command>
90scripts try to recover hotplug events that were lost during system boot
91because, e.g., the root filesystem was not mounted by the kernel.
92</para>
93</listitem>
94</varlistentry>
95
96<varlistentry id="hotplug-agent">
97<term><command>/etc/hotplug/*.agent</command></term>
98<listitem>
99<indexterm zone="ch-system-hotplug hotplug-agent"><primary
100sortas="d-/etc/hotplug/*.agent">/etc/hotplug/*.agent</primary></indexterm>
101<para>These scripts are called by <command>hotplug</command>
102in response to different types of hotplug events generated by the kernel.
103Their action is to insert corresponding kernel modules and call user-provided
104scripts, if any.
105</para>
106</listitem>
107</varlistentry>
108
109<varlistentry id="hotplug-functions">
110<term><filename>/etc/hotplug/hotplug.functions</filename></term>
111<listitem>
112<indexterm zone="ch-system-hotplug hotplug-functions"><primary
113sortas="e-/etc/hotplug/hotplug.functions">/etc/hotplug/hotplug.functions</primary></indexterm>
114<para>This file contains common functions used by other scripts in Hotplug
115package.
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>
125<para>This file contains the list of modules that should never be
126inserted into the kernel by hotplug scripts.
127</para>
128</listitem>
129</varlistentry>
130
131<varlistentry id="hotplug-subdirs">
132<term><filename class="directory">/etc/hotplug/{pci,usb}</filename></term>
133<listitem>
134<indexterm zone="ch-system-hotplug hotplug-subdirs"><primary
135sortas="e-/etc/hotplug/{pci,usb}">/etc/hotplug/{pci,usb}</primary></indexterm>
136<para>These directories are supposed to contain user-written handlers for
137hotplug events.
138</para>
139</listitem>
140</varlistentry>
141
142<varlistentry id="hotplug-usb.usermap">
143<term><filename>/etc/hotplug/usb.usermap</filename></term>
144<listitem>
145<indexterm zone="ch-system-hotplug hotplug-usb.usermap"><primary
146sortas="e-/etc/hotplug/usb.usermap">/etc/hotplug/usb.usermap</primary></indexterm>
147<para>This file contains rules that determine which user-defined handlers to
148call for each USB device, based on its vendor, id and other attributes.
149</para>
150</listitem>
151</varlistentry>
152
153<varlistentry id="hotplug-hotplug.d">
154<term><filename class="directory">/etc/hotplug.d</filename></term>
155<listitem>
156<indexterm zone="ch-system-hotplug hotplug-hotplug.d"><primary
157sortas="e-/etc/hotplug.d">/etc/hotplug.d</primary></indexterm>
158<para>This directory contains programs (or symlinks to them)
159that are interested in receiving hotplug events. E.g.,
160<application>Udev</application> puts its symlink here during installation.
161</para>
162</listitem>
163</varlistentry>
164</variablelist>
165</sect2>
166</sect1>
Note: See TracBrowser for help on using the repository browser.