Re: How to load a kernel module automatically?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 01 April 2007, Till Maas wrote:
>
> In the spec:
>
> %post
> %{_sysconfdir}/sysconf/modules/%{name}.modules || :
>
> %preun
> rmmod uinput || :
>
> /etc/sysconfig/modules/*.modules are executed at boottime, and the
> scriptlets load and remove the module at the right moment.

%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).  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.  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.

--
Fedora-maintainers mailing list
Fedora-maintainers@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-maintainers

--
Fedora-maintainers-readonly mailing list
Fedora-maintainers-readonly@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-maintainers-readonly

[Index of Archives]     [Fedora Users]     [Fedora Development]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux