2000-11-28 08:39:07

by David Brownell

[permalink] [raw]
Subject: sample /sbin/hotplug script

I've been quite pleased to see many recent improvement in hotplug
support ... 2.4 test11 is now hotplugging USB network adapters for
me when I need that! And many other devices at least get their
driver modules autoloaded (using modutils support) even if some
devices still need hand setup before they're usable.

To make a long story short, if you'd like to try it out I strongly
encourage you to put the attached shell script into /sbin/hotplug
and see if it does the right things when you plug in USB devices
or Cardbus adapters into your system. (And configure HOTPLUG;
see its config.help for more information.)

The test11 release has hotplug support for PCI, USB, and also for
networking interfaces. (Though I've not tested the Cardbus/PCI
support myself, and know it can't support class-based driver binding
without a small patch I'll resubmit.)

This script should handle all three. It's a start! Improvements
should be easy enough ... :-)

- Dave

p.s. I'm particularly aware of contributions to the Linux
hotplugging effort from Keith Owens, Adam Richter, and
Jeff Garzik.




Attachments:
hotplug.sh (11.20 kB)