Re: problem with /etc/kernel scripts
-----BEGIN PGP SIGNED MESSAGE-----
On 03/21/11 14:22, Ben Hutchings wrote:
> On Mon, 2011-03-21 at 06:17 +0100, Harald Dunkel wrote:
>> Do you think that dkms should drop its /etc/kernel/postinst.d/dkms
>> script? AFAICS this script might be called before the headers are
> It presumably should not rebuild modules unless both the image and
> header packages are installed. Depending on the order those packages
> are installed, either hook may trigger this. Also, it may be useful to
> warn the user when only the image package is upgraded.
Doesn't this mean that the modules are built twice?
I don't see that the kernel itself would be necessary to build a kernel
module. linux-headers should be installed before linux-image (if selected).
The header's postinst scripts in /etc/kernel/header_postinst.d should do
their job building all necessary modules, and when the kernel is installed
the scripts in /etc/kernel/postinst.d should update the initrd using the
Of course I understand that this is highly complex. Maybe it would help to
introduce some scheme to register event handlers to run after the installation
of all packages has been completed? linux-image could register a task
"build a new initrd, if there are new modules", for example. Grub2 could
register a task "update the grub config file, if there is a new kernel or a
new initrd". And so on.
The advantages would be that these actions would be run only once, and
the installation sequence might be different from the sequence of postinst
scripts to run.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----