%general-entities; ]> Hotplug-&hotplug-version; Hotplug <para>The Hotplug package contains scripts that react upon hotplug events generated by the kernel. Such events correspond to every change in the in the kernel state visible in the <systemitem class="filesystem">sysfs</systemitem> filesystem, e.g., the 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>&dependencies;</segtitle> <seglistitem> <seg>Bash, Coreutils, Find, Gawk, and Make</seg> </seglistitem> </segmentedlist> </sect2> <sect2 role="installation"> <title>Installation of Hotplug Install the Hotplug package: make install Remove the init script that Hotplug installs since we are going to be using the script included in the LFS-Bootscripts package: rm -rf /etc/init.d Network device hotplugging is not yet supported by the LFS-Bootscripts package. For that reason, remove the network hotplug agent: rm -f /etc/hotplug/net.agent Create a directory for storing firmware that can be loaded by hotplug: mkdir /lib/firmware Contents of Hotplug Installed program Installed scripts Installed files hotplug /etc/hotplug/*.rc, /etc/hotplug/*.agent /etc/hotplug/hotplug.functions, /etc/hotplug/blacklist, /etc/hotplug/{pci,usb}, /etc/hotplug/usb.usermap, /etc/hotplug.d, and /var/log/hotplug/events Short Descriptions hotplug This script is called by default by the Linux kernel when something changes in its internal state (e.g., a new device is added or removed) hotplug /etc/hotplug/*.rc These scripts are used for cold plugging, i.e., detecting and acting upon hardware already present during system startup. They are called by the hotplug initscript included in the LFS-Bootscripts package. The *.rc scripts try to recover hotplug events that were lost during system boot because, for example, the root filesystem was not mounted by the kernel /etc/hotplug/*.rc /etc/hotplug/*.agent These scripts are called by hotplug in response to different types of hotplug events generated by the kernel. Their action is to insert corresponding kernel modules and call any user-provided scripts /etc/hotplug/*.agent /etc/hotplug/blacklist This file contains the list of modules that should never be inserted into the kernel by the Hotplug scripts /etc/hotplug/blacklist /etc/hotplug/hotplug.functions This file contains common functions used by other scripts in the Hotplug package /etc/hotplug/hotplug.functions /etc/hotplug/{pci,usb} These directories contain user-written handlers for hotplug events /etc/hotplug/{pci,usb} /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/usb.usermap /etc/hotplug.d This directory contains programs (or symlinks to them) that are interested in receiving hotplug events. For example, Udev puts its symlink here during installation /etc/hotplug.d /lib/firmware This directory contains the firmware for devices that need to have their firmware loaded before use /lib/firmware /var/log/hotplug/events This file contains all the events that hotplug has called since bootup /var/log/hotplug/events