From 072ad3179c526b90b57719e127de851182b04c4c Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 25 Sep 2009 02:34:14 +0200 Subject: /etc/kernel hook script support newer kernel-package k-p no longer generates initramfs by itself, so do it for it. (closes: #523735) --- kernel/postinst.d/initramfs-tools | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'kernel/postinst.d/initramfs-tools') diff --git a/kernel/postinst.d/initramfs-tools b/kernel/postinst.d/initramfs-tools index 1cb72a8..b389921 100755 --- a/kernel/postinst.d/initramfs-tools +++ b/kernel/postinst.d/initramfs-tools @@ -1,10 +1,27 @@ #!/bin/sh +version="$1" +bootopt="" + # passing the kernel version is required -[ -z "$1" ] && exit 0 +[ -z "${version}" ] && exit 0 + +# kernel-package passes an extra arg +if [ -n "$2" ]; then + if [ -n "${KERNEL_PACKAGE_VERSION}" ]; then + ${bootdir}= $(dirname "$2") + bootopt="-b ${bootdir}" + else + exit 0 + fi +fi -# kernel-package passes an extra arg; hack to not run under kernel-package -[ -z "$2" ] || exit 0 +if [ -n "$DEB_MAINT_PARAMS" ]; then + eval set -- "$DEB_MAINT_PARAMS" + if [ -z "$1" ] || [ "$1" != "configure" ]; then + exit 0 + fi +fi # we're good - create initramfs. update runs do_bootloader -update-initramfs -c -t -k "$1" +update-initramfs -c -t -k "${version}" ${bootopt} -- cgit v1.2.3