12 Commits

Author SHA1 Message Date
Ben Hutchings
7866542a5d update-initramfs: Depend on kernel hook scripts rather than $ramdisk invocation
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>
2011-03-30 11:43:13 +02:00
Ben Hutchings
58ee42c5eb kernel hooks: Enable error-exit (sh -e)
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>
2011-03-30 11:43:03 +02:00
Ben Hutchings
c018886f4f kernel hooks: Treat missing version argument as an error
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>
2011-03-30 11:42:34 +02:00
Stephen Powell
ff6116f97b Redirect STDOUT to STDERR for post{inst,rm} hooks
Avoids output being swallowed by debconf's redirection of STDOUT.

Signed-off-by: maximilian attems <maks@debian.org>
2010-07-08 15:09:03 +02:00
Stephen Powell
09d251adb6 postinst hook: respect INITRD variable
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>
2010-07-08 15:09:03 +02:00
maximilian attems
3158f65132 kernel hook scripts: add comments
try to make the intention of the code more clear

Reported-by: Matthijs Kooijman <matthijs@stdin.nl>
Signed-off-by: maximilian attems <maks@debian.org>
2009-10-01 00:06:44 +02:00
maximilian attems
339235ef8f kernel hook scripts: Fix typo
/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>
2009-10-01 00:01:18 +02:00
maximilian attems
02cb277c7e /etc/kernel/postrm.d/i-t: use now takeover on delete
makes the script idempotent
(closes: #547365)

Reported-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: maximilian attems <maks@debian.org>
2009-09-25 19:49:51 +02:00
maximilian attems
072ad3179c /etc/kernel hook script support newer kernel-package
k-p no longer generates initramfs by itself,
so do it for it.

(closes: #523735)
2009-09-25 07:54:24 +02:00
Andres Salomon
7812c98cca initramfs-tools: Readd support for linux-2.6 make deb-pkg target.
..via /etc/kernel

Signed-off-by: Andres Salomon <dilinger@debian.org>

(closes: #504551)

[ fixed update-initramfs postinst call s/-u/-c/ -maks ]
Signed-off-by: maximilian attems <maks@debian.org>
2009-02-17 15:43:03 +01:00
maximilian attems
04356cfcee Revert "initramfs-tools: Add support for linux-2.6 make deb-pkg target"
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)
2008-09-17 15:36:16 +02:00
maximilian attems
c5a45496b9 initramfs-tools: Add support for linux-2.6 make deb-pkg target
it generates linux images that look into this directories
for maintainer script action.

make sure to generate an intramfs and also to remove it.
2008-09-16 14:54:06 +02:00