Official Debian and Ubuntu kernel packages will invoke us directly as
part of the $ramdisk handling inherited from kernel-package. They
will later run our hook script, as will custom packages made with
'make-kpkg' or the upstream 'make deb-pkg'.
Currently, for official packages we perform an update on the first
invocation (possibly deferred using dpkg triggers) and then ignore the
second. However, the long-term plan is to remove that first
invocation. Therefore, ignore the first invocation and perform the
update on the second.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
[ Use && op, we make the effort to not use -a evaluation. -maks ]
Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
We should not continue after a command unexpectedly fails.
Change the $INITRD test so that failure is not treated as unexpected.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
The version argument is mandatory and we should complain if some package
doesn't pass it rather than quietly failing to do our job.
However, making package removal fail is generally unhelpful, so
continue to return 0 from the postrm hook.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
[ Prefix new warnings as of 3a02c6f37d with W: -maks ]
Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
Do not create an initial RAM file system image for a custom kernel
created by make-kpkg if one was not requested by the --initrd flag of
make-kpkg.
Signed-off-by: maximilian attems <maks@debian.org>
/etc/kernel/postrm.d/initramfs-tools: line 12: =: command not found
It says:
${bootdir}= $(dirname "$2")
which should be:
bootdir=$(dirname "$2")
Tested-by: Matthijs Kooijman <matthijs@stdin.nl>
Signed-off-by: maximilian attems <maks@debian.org>
This reverts commit c5a45496b9c72e41333e213979d43fbcff34da9f.
hinders removal of other package linux-image postinst call also
the /etc/kernel structure, thus delete needs a takeover and this
is postlenny material.
thanks Vincent Danjean <vdanjean@debian.org> for report.
(closes: #499270)