hotplug.xml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. <indexterm zone="ch-system-hotplug"><primary sortas="a-Hotplug">Hotplug</primary></indexterm>
  10. <sect2 role="package"><title/>
  11. <para>The Hotplug package contains scripts that react upon hotplug events
  12. generated by the kernel. Such events correspond to every change in the kernel
  13. state visible in the <systemitem class="filesystem">sysfs</systemitem>
  14. filesystem, e.g., the addition and removal of hardware. This package also
  15. detects existing hardware during boot and inserts the relevant modules into the
  16. running kernel.</para>
  17. <segmentedlist>
  18. <segtitle>&buildtime;</segtitle>
  19. <segtitle>&diskspace;</segtitle>
  20. <seglistitem><seg>0.01 SBU</seg><seg>0.1 MB</seg></seglistitem>
  21. </segmentedlist>
  22. <segmentedlist>
  23. <segtitle>Hotplug installation depends on</segtitle>
  24. <seglistitem><seg>Unchecked</seg></seglistitem>
  25. </segmentedlist>
  26. </sect2>
  27. <sect2 role="installation">
  28. <title>Installation of Hotplug</title>
  29. <para>Install the Hotplug package:</para>
  30. <screen><userinput>make install</userinput></screen>
  31. <para>Copy a file that the <quote>install</quote> target omits.</para>
  32. <screen><userinput>cp etc/hotplug/pnp.distmap /etc/hotplug</userinput></screen>
  33. <para>Remove the init script that Hotplug installs, since we're going to be
  34. using the script included with LFS-Bootscripts:</para>
  35. <screen><userinput>rm -rf /etc/init.d</userinput></screen>
  36. <para>Network device hotplugging is not supported by LFS bootscripts yet. For
  37. that reason, remove the network hotplug agent:</para>
  38. <screen><userinput>rm -f /etc/hotplug/net.agent</userinput></screen>
  39. </sect2>
  40. <sect2 id="contents-hotplug" role="content"><title>Contents of Hotplug</title>
  41. <segmentedlist>
  42. <segtitle>Installed program</segtitle>
  43. <segtitle>Installed scripts</segtitle>
  44. <segtitle>Installed files</segtitle>
  45. <seglistitem><seg>hotplug</seg>
  46. <seg>/etc/hotplug/*.rc, /etc/hotplug/*.agent</seg>
  47. <seg>/etc/hotplug/hotplug.functions, /etc/hotplug/blacklist, /etc/hotplug/{pci,usb},
  48. /etc/hotplug/usb.usermap, /etc/hotplug.d</seg></seglistitem>
  49. </segmentedlist>
  50. <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
  51. <?dbfo list-presentation="list"?>
  52. <?dbhtml list-presentation="table"?>
  53. <varlistentry id="hotplug">
  54. <term><command>hotplug</command></term>
  55. <listitem>
  56. <indexterm zone="ch-system-hotplug hotplug"><primary
  57. sortas="b-hotplug">hotplug</primary></indexterm>
  58. <para>This script is called by default by Linux kernel when something
  59. changes in its internal state (e.g., a new device is added or removed).</para>
  60. </listitem>
  61. </varlistentry>
  62. <varlistentry id="hotplug-rc">
  63. <term><command>/etc/hotplug/*.rc</command></term>
  64. <listitem>
  65. <indexterm zone="ch-system-hotplug hotplug-rc"><primary
  66. sortas="d-/etc/hotplug/*.rc">/etc/hotplug/*.rc</primary></indexterm>
  67. <para>These scripts are used for cold plugging, i.e., detection and other
  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>
  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.
  74. </para>
  75. </listitem>
  76. </varlistentry>
  77. <varlistentry id="hotplug-agent">
  78. <term><command>/etc/hotplug/*.agent</command></term>
  79. <listitem>
  80. <indexterm zone="ch-system-hotplug hotplug-agent"><primary
  81. sortas="d-/etc/hotplug/*.agent">/etc/hotplug/*.agent</primary></indexterm>
  82. <para>These scripts are called by <command>hotplug</command>
  83. in response to different types of hotplug events generated by the kernel.
  84. Their action is to insert corresponding kernel modules and call user-provided
  85. scripts, if any.
  86. </para>
  87. </listitem>
  88. </varlistentry>
  89. <varlistentry id="hotplug-functions">
  90. <term><filename>/etc/hotplug/hotplug.functions</filename></term>
  91. <listitem>
  92. <indexterm zone="ch-system-hotplug hotplug-functions"><primary
  93. sortas="e-/etc/hotplug/hotplug.functions">/etc/hotplug/hotplug.functions</primary></indexterm>
  94. <para>This file contains common functions used by other scripts in Hotplug
  95. package.
  96. </para>
  97. </listitem>
  98. </varlistentry>
  99. <varlistentry id="hotplug-blacklist">
  100. <term><filename>/etc/hotplug/blacklist</filename></term>
  101. <listitem>
  102. <indexterm zone="ch-system-hotplug hotplug-blacklist"><primary
  103. sortas="e-/etc/hotplug/blacklist">/etc/hotplug/blacklist</primary></indexterm>
  104. <para>This file contains the list of modules that should never be
  105. inserted into the kernel by hotplug scripts.
  106. </para>
  107. </listitem>
  108. </varlistentry>
  109. <varlistentry id="hotplug-subdirs">
  110. <term><filename class="directory">/etc/hotplug/{pci,usb}</filename></term>
  111. <listitem>
  112. <indexterm zone="ch-system-hotplug hotplug-subdirs"><primary
  113. sortas="e-/etc/hotplug/{pci,usb}">/etc/hotplug/{pci,usb}</primary></indexterm>
  114. <para>These directories are supposed to contain user-written handlers for
  115. hotplug events.
  116. </para>
  117. </listitem>
  118. </varlistentry>
  119. <varlistentry id="hotplug-usb.usermap">
  120. <term><filename>/etc/hotplug/usb.usermap</filename></term>
  121. <listitem>
  122. <indexterm zone="ch-system-hotplug hotplug-usb.usermap"><primary
  123. sortas="e-/etc/hotplug/usb.usermap">/etc/hotplug/usb.usermap</primary></indexterm>
  124. <para>This file contains rules that determine which user-defined handlers to
  125. call for each USB device, based on its vendor, id and other attributes.
  126. </para>
  127. </listitem>
  128. </varlistentry>
  129. <varlistentry id="hotplug-hotplug.d">
  130. <term><filename class="directory">/etc/hotplug.d</filename></term>
  131. <listitem>
  132. <indexterm zone="ch-system-hotplug hotplug-hotplug.d"><primary
  133. sortas="e-/etc/hotplug.d">/etc/hotplug.d</primary></indexterm>
  134. <para>This directory contains programs (or symlinks to them)
  135. that are interested in receiving hotplug events. E.g.,
  136. <application>Udev</application> puts its symlink here during installation.
  137. </para>
  138. </listitem>
  139. </varlistentry>
  140. </variablelist>
  141. </sect2>
  142. </sect1>