[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
|
---|
| 16 | generated by the kernel. Such events correspond to every change in the
|
---|
| 17 | in the kernel state visible in the "sysfs" filesystem, e.g., the addition and
|
---|
| 18 | removal of hardware. This package also detects existing hardware during
|
---|
| 19 | boot 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] | 37 | the 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
|
---|
| 42 | that 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
|
---|
| 55 | sortas="b-hotplug">hotplug</primary></indexterm>
|
---|
| 56 | <para>This script is called by default by Linux kernel when something
|
---|
[ef57e3b] | 57 | changes 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
|
---|
| 66 | sortas="e-/etc/hotplug/*.rc">/etc/hotplug/*.rc</primary></indexterm>
|
---|
| 67 | <para>These scripts are used for cold plugging, i.e., detection and other
|
---|
[5f98035] | 68 | specific actions upon hardware already present during system startup.
|
---|
| 69 | They are called by the <filename>hotplug</filename> initscript that comes
|
---|
| 70 | from the lfs-bootscripts package.
|
---|
| 71 | The <command>*.rc</command>
|
---|
[3f91a9c] | 72 | scripts try to recover hotplug events that were lost during system boot
|
---|
| 73 | because, 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
|
---|
| 83 | sortas="e-/etc/hotplug/*.agent">/etc/hotplug/*.agent</primary></indexterm>
|
---|
[72b0264] | 84 | <para>These scripts are called by <command>/sbin/hotplug</command>
|
---|
| 85 | in response to different types of hotplug events generated by the kernel.
|
---|
| 86 | Their action is to insert corresponding kernel modules and call user-provided
|
---|
| 87 | scripts, 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
|
---|
| 96 | sortas="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] | 98 | package.
|
---|
| 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
|
---|
| 107 | sortas="e-/etc/hotplug/blacklist">/etc/hotplug/blacklist</primary></indexterm>
|
---|
| 108 | <para>This file contains the list of modules that should never be
|
---|
| 109 | inserted 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
|
---|
| 118 | sortas="e-/etc/hotplug/{pci,usb}">/etc/hotplug/{pci,usb}</primary></indexterm>
|
---|
[72b0264] | 119 | <para>These directories are supposed to contain user-written handlers for
|
---|
| 120 | hotplug 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
|
---|
| 129 | sortas="e-/etc/hotplug/usb.usermap">/etc/hotplug/usb.usermap</primary></indexterm>
|
---|
| 130 | <para>This file contains rules that determine which user-defined handlers to
|
---|
| 131 | call 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
|
---|
| 140 | sortas="e-/etc/hotplug.d">/etc/hotplug.d</primary></indexterm>
|
---|
[72b0264] | 141 | <para>This directory contains programs (or symlinks to them)
|
---|
[3f91a9c] | 142 | that 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>
|
---|