source: chapter06/hotplug.xml@ c2913ea

Last change on this file since c2913ea was 6a0e6f3, checked in by Matthew Burgess <matthew@…>, 20 years ago
  • Remove the spurious <info> tags that I thought were necessary but evidently aren't

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

  • Property mode set to 100644
File size: 5.4 KB
RevLine 
[72b0264]1<?xml version="1.0" encoding="ISO-8859-1"?>
[1fe35e1]2<!DOCTYPE section [
[72b0264]3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
[1fe35e1]6<section xmlns="http://docbook.org/docbook-ng"
7 xml:id="ch-system-hotplug" xreflabel="Hotplug" role="wrap">
[6a0e6f3]8<title>Hotplug-&hotplug-version;</title>
[72b0264]9<?dbhtml filename="hotplug.html"?>
10
11<indexterm zone="ch-system-hotplug"><primary sortas="a-Hotplug">Hotplug</primary></indexterm>
12
[6a0e6f3]13<section role="package"><title/>
[72b0264]14
[3f91a9c]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.
[72b0264]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
[1fe35e1]27</section>
[72b0264]28
[1fe35e1]29<section role="installation">
[6a0e6f3]30<title>Installation of Hotplug</title>
[72b0264]31
[e2a70be]32<para>Install the Hotplug package:</para>
[72b0264]33
34<screen><userinput>make install</userinput></screen>
35
[ef57e3b]36<para>Remove Hotplug's not-so-clean init script, since we're going to be using
[bad0dd1]37the script including with LFS-Bootscripts:</para>
[72b0264]38
[bad0dd1]39<screen><userinput>rm -rf /etc/init.d</userinput></screen>
[72b0264]40
[3f91a9c]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>
[1fe35e1]45</section>
[72b0264]46
47
[6a0e6f3]48<section xml:id="contents-hotplug" role="content"><title>Contents of Hotplug</title>
[72b0264]49
50<variablelist>
[1fe35e1]51<varlistentry xml:id="hotplug">
[b8a819f]52<term><command>/sbin/hotplug</command></term>
[72b0264]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
[ef57e3b]57changes in its internal state (e.g., a new device is added or removed).</para>
[72b0264]58</listitem>
59</varlistentry>
60
[1fe35e1]61<varlistentry xml:id="hotplug-rc">
[b8a819f]62<term><command>*.rc</command> files in
[72b0264]63<filename class="directory">/etc/hotplug</filename> directory</term>
64<listitem>
[ef57e3b]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
[5f98035]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>
[3f91a9c]72scripts try to recover hotplug events that were lost during system boot
73because, e.g., the root filesystem was not mounted by the kernel.
[72b0264]74</para>
75</listitem>
76</varlistentry>
77
[1fe35e1]78<varlistentry xml:id="hotplug-agent">
[b8a819f]79<term><command>*.agent</command> files in
[72b0264]80<filename class="directory">/etc/hotplug</filename> directory</term>
81<listitem>
[ef57e3b]82<indexterm zone="ch-system-hotplug hotplug-agent"><primary
83sortas="e-/etc/hotplug/*.agent">/etc/hotplug/*.agent</primary></indexterm>
[72b0264]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
[1fe35e1]92<varlistentry xml:id="hotplug-functions">
[b8a819f]93<term><filename>/etc/hotplug/hotplug.functions</filename></term>
[72b0264]94<listitem>
[ef57e3b]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
[72b0264]98package.
99</para>
100</listitem>
101</varlistentry>
102
[1fe35e1]103<varlistentry xml:id="hotplug-blacklist">
[b8a819f]104<term><filename>/etc/hotplug/blacklist</filename></term>
[72b0264]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
[1fe35e1]114<varlistentry xml:id="hotplug-subdirs">
[b8a819f]115<term><filename class="directory">/etc/hotplug/{pci,usb}</filename></term>
[72b0264]116<listitem>
[ef57e3b]117<indexterm zone="ch-system-hotplug hotplug-subdirs"><primary
118sortas="e-/etc/hotplug/{pci,usb}">/etc/hotplug/{pci,usb}</primary></indexterm>
[72b0264]119<para>These directories are supposed to contain user-written handlers for
120hotplug events.
121</para>
122</listitem>
123</varlistentry>
124
[1fe35e1]125<varlistentry xml:id="hotplug-usb.usermap">
[b8a819f]126<term><filename>/etc/hotplug/usb.usermap</filename></term>
[72b0264]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
[1fe35e1]136<varlistentry xml:id="hotplug-hotplug.d">
[b8a819f]137<term><filename class="directory">/etc/hotplug.d</filename></term>
[72b0264]138<listitem>
[ef57e3b]139<indexterm zone="ch-system-hotplug hotplug-hotplug.d"><primary
140sortas="e-/etc/hotplug.d">/etc/hotplug.d</primary></indexterm>
[72b0264]141<para>This directory contains programs (or symlinks to them)
[3f91a9c]142that are interested in receiving hotplug events. E.g.,
[72b0264]143<application>udev</application> puts its symlink here during installation.
144</para>
145</listitem>
146</varlistentry>
147</variablelist>
[1fe35e1]148</section>
149</section>
Note: See TracBrowser for help on using the repository browser.