From b9590afc81e0ef83eb4252f68c3ec41fc88a7756 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 15 Apr 2008 22:33:01 +0200 Subject: Restricting counting of installed kernels based on /boot/vmlinuz-* instead of /boot/vmlinuz*. Kernel images installed the proper way from .deb packages are always naming their kernel files vmlinuz-*. This way, we can avoid tampering with completely customized kernels which handle initramfs on their own (or completely different). --- debian/postinst | 2 +- debian/postrm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/postinst b/debian/postinst index 805eb0a..71d71e3 100644 --- a/debian/postinst +++ b/debian/postinst @@ -1,6 +1,6 @@ #!/bin/sh -case "$(ls -l /boot/vmlinuz* | wc -l)" in +case "$(ls -l /boot/vmlinuz-* | wc -l)" in 1) # We only have one kernel installed, so we can use "-u" # which will use dpkg-trigger inside update-initramfs diff --git a/debian/postrm b/debian/postrm index 805eb0a..71d71e3 100644 --- a/debian/postrm +++ b/debian/postrm @@ -1,6 +1,6 @@ #!/bin/sh -case "$(ls -l /boot/vmlinuz* | wc -l)" in +case "$(ls -l /boot/vmlinuz-* | wc -l)" in 1) # We only have one kernel installed, so we can use "-u" # which will use dpkg-trigger inside update-initramfs -- cgit v1.2.3