Module module

I’m thinking of writing a module for loading Linux kernel modules. Basically, if you did something like:

kernel_module: name=8021q

Then it will “modprobe” the kernel module, and it would also edit the appropriate config file so that the module would be loaded on boot. My initial inclination would be to implement the load on boot by modifying the /etc/modules file.

My question is: does kernel module loading on boot vary by Linux distribution? I have a vague sense that Fedora-derived distros now use a different scheme for specifying which kernel modules to load at boot, although /etc/modules is still read for backwards compatibility. Ideally, the module would do things the “right” way for each distro.

Alternatively, I can just implement the /etc/modules way for now, and have someone else modify this to fit better with their own distro, as needed.

Yes it does. And from memory its changed a bit with different versions,
with Fedora at least.
No time to go digging for details, but on my F18 laptop I have both

/etc/modprobe.d/
/etc/modules-load.d/
/etc/sysconfig/modules/

but no

/etc/modules

K