Hotplough 0.0 review

by on

Hotplough is a Linux hotplug subsystem support tool

License: GPL (GNU General Public License)
File size: 85K
Developer: Klever Group
0 stars award from

Hotplough is a Linux hotplug subsystem support tool. It is started whenever the hotplug event occurs - e.g. when you insert a USB device, ifconfig up your network interface, plug in the PCMCIA card, etc. The task of hotplug support tool is to load appropriate modules into kernel and do whatever else the administrator of the system wants it to perform.

Once I upgraded my kernel to 2.6 branch I found out that the murasaki hotplug support system isn't working anymore. Checking out the murasaki homepage at that time was of little help. The usual upgrade story.

So I tried the hotplug support script, mentioned somewhere in kernel documentation or the post-halloween document... Well, it worked. But, even though I don't reboot daily, I thought I can't afford the luxury of wasting 10-15 minutes on the mere bootup. Besides, hotplug events may happen to occur not only when I reboot and to put such a load on the machine when I, say, synchronize my handheld doesn't sound appealing either.

These unfortunate events took place, doubtlessly in order that the next KIN might be born. And yes, I decided to rewrite the whole thing. No wonder that when redone in c, things work tons faster.

Thus came the hotplough. If you run the tool with no parameters (kernel will never do so) with root privileges and /proc filesystem mounted it will install itself as a hotplug handler in the /proc/sys/kernel/hotplug. This should be done somewhere in the very beginning of your initscripts.

Speaking of which. You should receive a word of warning here. So, let me explain why you don't want to use hotplough. Most likely you're using one of the countless linux distributions that do everything for you and in return expect you to maintain compatibility with them. Since I do not use any distribution (real men compile from sources, don't they?) I didn't have to and didn't want to make hotplough compatible with any existing implementation, even though it may work in similar manner.

And for the brave souls who keep reading on, another warning: the current version lacks features. In particular there's no support of PCI hotplug which I am not using and don't expect to start using in the nearest future. It also lacks PCMCIA hotplug support which is likely to come as soon as I will install linux on my notebook which is not used now. If you feel like implementing missing features yourself, your patches are welcome.

Now that the weak of will are scared off, the only thing left to explain is where to store your hotplug agents (i.e. executables to be launched at particular hotplug events). Unless you specify otherwise, the base directory for agents is ${prefix}/etc/hotplough. It is expected to have subdirectories for different device classes, such as bluetooth, net, tty, usb and the most special (or better the least special) of them - generic.

At this time if you want to know more details on how to lay out the aforementioned directory or what d-bus signals hotplough sends you will have to either look up the code or ask a specific question.

a c compiler
a make tool

Hotplough 0.0 keywords