Proper way to autoload modules (/etc/rc.modules)?

Peter Jones pjones at redhat.com
Wed Apr 6 19:08:14 UTC 2005


On Wed, 2005-04-06 at 00:22 -0700, Pete Zaitcev wrote:

> So far I did not see a good reason to keep /etc/rc.modules around
> in this thread (with a possible exception of pcspkr, because it
> plugs into HID; but even there a smart kernel patch ought to help).

There's a lot of utility to having them get loaded very, very early.  If
you're going to do this in init.d, you're basically asking for people to
start naming services "a_module" and putting them as script 0 so they
get to be S00a_module and started early.  That's just ugly and messy.

But at the same time, once somebody actually starts using this
rc.modules.d idea, they're going to quickly discover that they want
ordering there, as well, to make sure e.g. the various usb hcd modules
are loaded in the order they want.


Putting "finding a space" in init.d isn't particularly hard, but it will
start to get awfully cluttered at some point.  So at least the
rc.modules.d idea aleviates that some by making it a different queue of
scripts to be run.  But it'll still need to be a queue, not just a bunch
of scripts in a directory.
-- 
        Peter




More information about the devel mailing list