On Sunday 17 February 2008 12:11:18 pm Franklin PIAT wrote:
> On Sun, 2008-02-17 at 11:26 +0100, Patrick Scharrenberg wrote:
> > So, what is the best practice to recompile kernel-modules on
> > kernel-upgrades?
> >
> > Any thoughts?
>
> What about postinst_hook in /etc/kernel-img.conf ?
> manpage say's "... A script to be executed during installation after all
> the symbolic links are created, but before running the bootloader."
the problem, and this is one that has been brought up and discussed several
times, is that there's not an easy way to hook this back into dpkg, since
it's probably being called by dpkg to begin with. that is, you do "apt-get
upgrade" and are upgrading your kernel image, and it runs this hook which
recompiles your kernel modules and produces a deb, but... then?
personally i can see two ways of trying to work with this, assuming "slip a
package into the running dpkg's list of packages to install" is not a
solution, which i think would make most developers cringe.
way #1: generate the package in an upgrade hook, but without installing the
package take the kernel modules and add them to the initrd. still a little
sketchy, i'd say.
way #2: generate the package in an upgrade hook, and store it in m-a specific
location. an init script at shutdown/reboot time will look in this directory
for packages that should be installed.
what i like about #2 is that there is less "stuff" going on in the critical
stuff-going-wrong-can-hose-your-system phase. that is, if a module
compilation broke for some reason, it would be far easier to make it
noticeable (perhaps even fail the upgrade).
anyway, just my 0.02 ${LC_MONETARY}.
sean
Attachment:
signature.asc
Description: This is a digitally signed message part.