source: chapter06/hotplug.xml@ 84ba73a

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 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/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 84ba73a was 84ba73a, checked in by Jeremy Utley <jeremy@…>, 20 years ago

Added a sed to fix hotplug's syntax error in isapnp.rc, also completed Jim's integration of the new util-linux patch.

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

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