This is achieved through the installation of a script in: /etc/kernel/header_postinst.d/ /etc/kernel/postinst.d/ /etc/kernel/prerm.d/ A quick search with apt-file didn't return any result. Is this approach supported by Debian?
/etc/kernel/header_postinst.d/ isn't supported.
I remember grub updating itself when a new kernel is installed: is that a postinst by the kernel package itself?
Yes.