ANNOUNCE: dkms 2.0.17
Matt_Domsch at dell.com
Fri Jul 13 11:12:48 CDT 2007
On Fri, Jul 13, 2007 at 11:06:42AM +0200, Brinkman, Alexander wrote:
> It would seem that the new Ubuntu stuff that was introduced still has a
> little bug in it. Or better said: probably DKMS is ok, but the hook
> mechanism is not working correctly anymore.
> With DKMS 2.0.17 the file /etc/kernel-img.conf now reads:
> do_symlinks = yes
> relative_links = yes
> do_bootloader = no
> do_bootfloppy = no
> do_initrd = yes
> link_in_boot = no
> postinst_hook = /sbin/update-grub
> postrm_hook = /sbin/update-grub
> header_postinst_hook = /etc/kernel/postinst.d/dkms
> When this last line is in the config file the previous lines are not
> called anymore (the postinst and postrm hooks). So update-grub is not
> executed anymore on a kernel update (or remove), which is not good.
> It can fairly easily be fixed by adding a link in the
> /etc/kernel/postinst.d directory to /sbin/update-grub.
> But I'm not really sure why the hooks in the config file are not used
> anymore. Perhaps because the /etc/kernel/* directories were empty
> before, and now there's a dkms script in them (which would maybe
> overrule the postinst/postrm_hook entries in the config file?). However,
> when removing the last line from the kernel-img.conf file, update-grub
> is again called upon installation of a new kernel... very confusing...
Doh. See this in /var/lib/dpkg/info/linux-image-2.6.20-16-generic.postinst:
$postinst_hook = "$1" if /postinst_hook\s*=\s*(\S+)/ig;
Notice the test. It's matching postinst_hook on the
header_postinst_hook line from the /etc/kernel-img.conf file, so it's
overriding the call to update-grub with another call to dkms.
That is a bug in the linux-image scripts. Will file as such.
I guess that also means we can't rely on that to hook in DKMS for a
while... :-( And we'll have to respin DKMS to remove that...
Thanks for the report.
Linux Software Architect, Dell Office of the CTO
linux.dell.com & www.dell.com/linux
More information about the DKMS-devel