summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xkernel/postinst.d/initramfs-tools4
-rwxr-xr-xkernel/postrm.d/initramfs-tools2
2 files changed, 4 insertions, 2 deletions
diff --git a/kernel/postinst.d/initramfs-tools b/kernel/postinst.d/initramfs-tools
index 68124f7..d4db23d 100755
--- a/kernel/postinst.d/initramfs-tools
+++ b/kernel/postinst.d/initramfs-tools
@@ -9,6 +9,8 @@ bootopt=""
# kernel-package passes an extra arg
if [ -n "$2" ]; then
if [ -n "${KERNEL_PACKAGE_VERSION}" ]; then
+ # exit if custom kernel does not need an initramfs
+ [ "$INITRD" = 'No' ] && exit 0
bootdir=$(dirname "$2")
bootopt="-b ${bootdir}"
else
@@ -26,4 +28,4 @@ if [ -n "$DEB_MAINT_PARAMS" ]; then
fi
# we're good - create initramfs. update runs do_bootloader
-update-initramfs -c -t -k "${version}" ${bootopt}
+update-initramfs -c -t -k "${version}" ${bootopt} >&2
diff --git a/kernel/postrm.d/initramfs-tools b/kernel/postrm.d/initramfs-tools
index 7811589..4e8f73b 100755
--- a/kernel/postrm.d/initramfs-tools
+++ b/kernel/postrm.d/initramfs-tools
@@ -26,4 +26,4 @@ if [ -n "$DEB_MAINT_PARAMS" ]; then
fi
# delete initramfs
-update-initramfs -d -t -k "${version}" ${bootopt}
+update-initramfs -d -t -k "${version}" ${bootopt} >&2