| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 | <?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [  <!ENTITY % general-entities SYSTEM "../general.ent">  %general-entities;]><sect1 id="ch-system-hotplug" xreflabel="Hotplug" role="wrap"><title>Hotplug-&hotplug-version;</title><?dbhtml filename="hotplug.html"?><indexterm zone="ch-system-hotplug"><primary sortas="a-Hotplug">Hotplug</primary></indexterm><sect2 role="package"><title/><para>The Hotplug package contains scripts that react upon various changesin the kernel state, in particular, addition and removal of hardware. Thispackage also detects existing hardware during boot and inserts the relevantmodules into the running kernel.</para><segmentedlist><segtitle>&buildtime;</segtitle><segtitle>&diskspace;</segtitle><seglistitem><seg>0.01 SBU</seg><seg>0.1 MB</seg></seglistitem></segmentedlist></sect2><sect2 role="installation"><title>Installation of Hotplug</title><para>Apply the patch that avoids bogus dependencies of the<filename>usb.rc</filename> scriptupon <application>which</application> and<application>usbutils</application> packages:</para><screen><userinput>patch -Np1 -i ../hotplug-&hotplug-version;-bogus-deps-1.patch</userinput></screen><para>USB coldplugging is somewhat broken in Hotplug by default. Fix this with thefollowing patch:</para><screen><userinput>patch -Np1 -i ../hotplug-&hotplug-version;-device-2.patch</userinput></screen><para>At last, there is an optional patch that adds ISAPNP hardware detectioncapabilities to hotplug. It is not well tested. If you chose to apply it,run the following command:</para><screen><userinput>patch -Np1 -i ../hotplug-&hotplug-version;-isapnp-2.patch</userinput></screen><para>And finally install the hotplug package:</para><screen><userinput>make install</userinput></screen><para>Remove hotplug's not-so-clean init script, since we're going to be usingthe script including with LFS-Bootscripts:</para><screen><userinput>rm -rf /etc/init.d</userinput></screen><para>If you have applied the ISAPNP patch, add some required entries to<filename>/etc/modprobe.conf</filename>:</para><screen><userinput>cat >>/etc/modprobe.conf <<"EOF"</userinput># Begin /etc/modprobe.conf entries for ISAPNP hardware detection script# by Marco d'Itrialias pnp:dPNP0511 irtty-siralias pnp:dPNP0700 floppyalias pnp:dPNP0800 pcspkralias pnp:dPNP0B00 rtcalias pnp:dPNP0303 atkbdalias pnp:dPNP0F13 psmousealias pnp:dPNPB02F analog# End /etc/modprobe.conf entries for ISAPNP hardware detection script<userinput>EOF</userinput></screen><para>These entries may become unneded for newer versions of Linux kernel,since Marco d'Itri will try to convince developers to put them into thecorresponding modules themselves.</para></sect2><sect2 id="contents-hotplug" role="content"><title>Contents of Hotplug</title><variablelist><varlistentry id="hotplug"><term><command>/sbin/hotplug</command></term><listitem><indexterm zone="ch-system-hotplug hotplug"><primarysortas="b-hotplug">hotplug</primary></indexterm><para>This script is called by default by Linux kernel when somethingchanges in its internal state (e.g. a new device is added or removed).</para></listitem></varlistentry><varlistentry id="hotplug-rc"><term><command>*.rc</command> files in<filename class="directory">/etc/hotplug</filename> directory</term><listitem><para>These scripts are used for cold plugging, i.e. detection and otherspecific actions upon hardware already present during system startup. They are called by the <filename>hotplug</filename> initscript that comesfrom the lfs-bootscripts package.The <command>*.rc</command>scripts try to find kernel modules corresponding to your hardware and insertthem into the running kernel.</para></listitem></varlistentry><varlistentry id="hotplug-agent"><term><command>*.agent</command> files in<filename class="directory">/etc/hotplug</filename> directory</term><listitem><para>These scripts are called by <command>/sbin/hotplug</command>in response to different types of hotplug events generated by the kernel.Their action is to insert corresponding kernel modules and call user-providedscripts, if any.</para></listitem></varlistentry><varlistentry id="hotplug-functions"><term><filename>/etc/hotplug/hotplug.functions</filename></term><listitem><para>This file contains common functions used by other scripts in hotplugpackage.</para></listitem></varlistentry><varlistentry id="hotplug-blacklist"><term><filename>/etc/hotplug/blacklist</filename></term><listitem><indexterm zone="ch-system-hotplug hotplug-blacklist"><primarysortas="e-/etc/hotplug/blacklist">/etc/hotplug/blacklist</primary></indexterm><para>This file contains the list of modules that should never beinserted into the kernel by hotplug scripts.</para></listitem></varlistentry><varlistentry id="hotplug-subdirs"><term><filename class="directory">/etc/hotplug/{pci,usb}</filename></term><listitem><para>These directories are supposed to contain user-written handlers forhotplug events.</para></listitem></varlistentry><varlistentry id="hotplug-usb.usermap"><term><filename>/etc/hotplug/usb.usermap</filename></term><listitem><indexterm zone="ch-system-hotplug hotplug-usb.usermap"><primarysortas="e-/etc/hotplug/usb.usermap">/etc/hotplug/usb.usermap</primary></indexterm><para>This file contains rules that determine which user-defined handlers tocall for each USB device, based on its vendor, id and other attributes.</para></listitem></varlistentry><varlistentry id="hotplug-hotplug.d"><term><filename class="directory">/etc/hotplug.d</filename></term><listitem><para>This directory contains programs (or symlinks to them)that are interested in receiving all hotplug events. E.g.,<application>udev</application> puts its symlink here during installation.</para></listitem></varlistentry></variablelist></sect2></sect1>
 |