%general-entities; ]> Hotplug-&hotplug-version; Hotplug <para>The Hotplug package contains scripts that react upon various changes in the kernel state, in particular, addition and removal of hardware. This package also detects existing hardware during boot and inserts the relevant modules 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 Apply the patch that avoids bogus dependencies of the usb.rc script upon which and usbutils packages: patch -Np1 -i ../hotplug-&hotplug-version;-bogus-deps-1.patch USB coldplugging is somewhat broken in Hotplug by default. Fix this with the following patch: patch -Np1 -i ../hotplug-&hotplug-version;-device-2.patch At last, there is an optional patch that adds ISAPNP hardware detection capabilities to hotplug. It is not well tested. If you chose to apply it, run the following command: patch -Np1 -i ../hotplug-&hotplug-version;-isapnp-2.patch And finally install the hotplug package: make install Remove hotplug's not-so-clean init script, since we're going to be using the script including with LFS-Bootscripts: rm -rf /etc/init.d If you have applied the ISAPNP patch, add some required entries to /etc/modprobe.conf: cat >>/etc/modprobe.conf <<"EOF" # Begin /etc/modprobe.conf entries for ISAPNP hardware detection script # by Marco d'Itri alias pnp:dPNP0511 irtty-sir alias pnp:dPNP0700 floppy alias pnp:dPNP0800 pcspkr alias pnp:dPNP0B00 rtc alias pnp:dPNP0303 atkbd alias pnp:dPNP0F13 psmouse alias pnp:dPNPB02F analog # End /etc/modprobe.conf entries for ISAPNP hardware detection script EOF These entries may become unneded for newer versions of Linux kernel, since Marco d'Itri will try to convince developers to put them into the corresponding modules themselves. Contents of Hotplug /sbin/hotplug hotplug This script is called by default by Linux kernel when something changes in its internal state (e.g. a new device is added or removed). *.rc files in /etc/hotplug directory These scripts are used for cold plugging, i.e. detection and other specific actions upon hardware already present during system startup. They are called by the hotplug initscript that comes from the lfs-bootscripts package. The *.rc scripts try to find kernel modules corresponding to your hardware and insert them into the running kernel. *.agent files in /etc/hotplug directory These scripts are called by /sbin/hotplug in response to different types of hotplug events generated by the kernel. Their action is to insert corresponding kernel modules and call user-provided scripts, if any. /etc/hotplug/hotplug.functions This file contains common functions used by other scripts in hotplug package. /etc/hotplug/blacklist /etc/hotplug/blacklist This file contains the list of modules that should never be inserted into the kernel by hotplug scripts. /etc/hotplug/{pci,usb} These directories are supposed to contain user-written handlers for hotplug events. /etc/hotplug/usb.usermap /etc/hotplug/usb.usermap This file contains rules that determine which user-defined handlers to call for each USB device, based on its vendor, id and other attributes. /etc/hotplug.d This directory contains programs (or symlinks to them) that are interested in receiving all hotplug events. E.g., udev puts its symlink here during installation.