source: chapter06/hotplug.xml@ 9ed3209

Last change on this file since 9ed3209 was c9214d5, checked in by Jeremy Utley <jeremy@…>, 20 years ago

Massive package updates - see changelog for details - first update to Testing since 6.0 went to publishers

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

  • Property mode set to 100644
File size: 5.5 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/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 "sysfs" filesystem, e.g., the addition and
18removal of hardware. This package also detects existing hardware during
19boot and inserts the relevant modules into the running kernel.
20</para>
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</sect2>
28
29<sect2 role="installation">
30<title>Installation of Hotplug</title>
31
32<para>Install the Hotplug package:</para>
33
34<screen><userinput>make install</userinput></screen>
35
36<para>Remove Hotplug's not-so-clean init script, since we're going to be using
37the script including with LFS-Bootscripts:</para>
38
39<screen><userinput>rm -rf /etc/init.d</userinput></screen>
40
41<para>Network device hotplugging is not supported by LFS bootscripts yet. For
42that reason, remove the network hotplug agent:</para>
43
44<screen><userinput>rm -f /etc/hotplug/net.agent</userinput></screen>
45</sect2>
46
47
48<sect2 id="contents-hotplug" role="content"><title>Contents of Hotplug</title>
49
50<variablelist>
51<varlistentry id="hotplug">
52<term><command>/sbin/hotplug</command></term>
53<listitem>
54<indexterm zone="ch-system-hotplug hotplug"><primary
55sortas="b-hotplug">hotplug</primary></indexterm>
56<para>This script is called by default by Linux kernel when something
57changes in its internal state (e.g., a new device is added or removed).</para>
58</listitem>
59</varlistentry>
60
61<varlistentry id="hotplug-rc">
62<term><command>*.rc</command> files in
63<filename class="directory">/etc/hotplug</filename> directory</term>
64<listitem>
65<indexterm zone="ch-system-hotplug hotplug-rc"><primary
66sortas="e-/etc/hotplug/*.rc">/etc/hotplug/*.rc</primary></indexterm>
67<para>These scripts are used for cold plugging, i.e., detection and other
68specific actions upon hardware already present during system startup.
69They are called by the <filename>hotplug</filename> initscript that comes
70from the lfs-bootscripts package.
71The <command>*.rc</command>
72scripts try to recover hotplug events that were lost during system boot
73because, e.g., the root filesystem was not mounted by the kernel.
74</para>
75</listitem>
76</varlistentry>
77
78<varlistentry id="hotplug-agent">
79<term><command>*.agent</command> files in
80<filename class="directory">/etc/hotplug</filename> directory</term>
81<listitem>
82<indexterm zone="ch-system-hotplug hotplug-agent"><primary
83sortas="e-/etc/hotplug/*.agent">/etc/hotplug/*.agent</primary></indexterm>
84<para>These scripts are called by <command>/sbin/hotplug</command>
85in response to different types of hotplug events generated by the kernel.
86Their action is to insert corresponding kernel modules and call user-provided
87scripts, if any.
88</para>
89</listitem>
90</varlistentry>
91
92<varlistentry id="hotplug-functions">
93<term><filename>/etc/hotplug/hotplug.functions</filename></term>
94<listitem>
95<indexterm zone="ch-system-hotplug hotplug-functions"><primary
96sortas="e-/etc/hotplug/hotplug.functions">/etc/hotplug/hotplug.functions</primary></indexterm>
97<para>This file contains common functions used by other scripts in Hotplug
98package.
99</para>
100</listitem>
101</varlistentry>
102
103<varlistentry id="hotplug-blacklist">
104<term><filename>/etc/hotplug/blacklist</filename></term>
105<listitem>
106<indexterm zone="ch-system-hotplug hotplug-blacklist"><primary
107sortas="e-/etc/hotplug/blacklist">/etc/hotplug/blacklist</primary></indexterm>
108<para>This file contains the list of modules that should never be
109inserted into the kernel by hotplug scripts.
110</para>
111</listitem>
112</varlistentry>
113
114<varlistentry id="hotplug-subdirs">
115<term><filename class="directory">/etc/hotplug/{pci,usb}</filename></term>
116<listitem>
117<indexterm zone="ch-system-hotplug hotplug-subdirs"><primary
118sortas="e-/etc/hotplug/{pci,usb}">/etc/hotplug/{pci,usb}</primary></indexterm>
119<para>These directories are supposed to contain user-written handlers for
120hotplug events.
121</para>
122</listitem>
123</varlistentry>
124
125<varlistentry id="hotplug-usb.usermap">
126<term><filename>/etc/hotplug/usb.usermap</filename></term>
127<listitem>
128<indexterm zone="ch-system-hotplug hotplug-usb.usermap"><primary
129sortas="e-/etc/hotplug/usb.usermap">/etc/hotplug/usb.usermap</primary></indexterm>
130<para>This file contains rules that determine which user-defined handlers to
131call for each USB device, based on its vendor, id and other attributes.
132</para>
133</listitem>
134</varlistentry>
135
136<varlistentry id="hotplug-hotplug.d">
137<term><filename class="directory">/etc/hotplug.d</filename></term>
138<listitem>
139<indexterm zone="ch-system-hotplug hotplug-hotplug.d"><primary
140sortas="e-/etc/hotplug.d">/etc/hotplug.d</primary></indexterm>
141<para>This directory contains programs (or symlinks to them)
142that are interested in receiving hotplug events. E.g.,
143<application>udev</application> puts its symlink here during installation.
144</para>
145</listitem>
146</varlistentry>
147</variablelist>
148</sect2>
149</sect1>
Note: See TracBrowser for help on using the repository browser.