How to load a kernel module automatically?

Till Maas opensource at till.name
Sun Apr 1 17:51:52 UTC 2007


On So April 1 2007, Ville Skyttä wrote:

> %post above is broken, it'll fail to do the right thing if the module is
> already loaded.  %preun is broken too, it'll cause the module to be removed
> on package upgrades (assuming it succeeds).  

I do not understand, why this is broken. When updating a kernel module, 
unloading it in %preun and loading the new one in %post seems to me to be the 
desired behaviour. At least this is what I expect as a user. And when the 
module is currently used, so it cannot be removed, then there is imho nothing 
useful the system could do, instead of nothing, which is what will happen 
with the scriptlets.

> The scriptlets above also 
> don't take into account if the package being installed/upgraded/erased
> contains modules for the currently running kernel in the first place; if
> not, they're not desirable.

As far as I understand the scriptlets, they will silently fail when one 
installs the wrong kernel-module, but why should this happen in reality?

> I think it's generally better to not try 
> adding/removing modules in scriptlets at all, but just do the depmod -a(e)
> for the correct kernel.

For me it would be annoying to manually have to reload a module, when this 
could happen automatically. Also you did not explain what is going wrong with 
these scriptlets except that they would do nothing in some cases.

Regards,
Till
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-maintainers/attachments/20070401/f31fd170/attachment.sig>


More information about the Fedora-maintainers mailing list