Restricting counting of installed kernels based on /boot/vmlinuz-* instead of /boot...
authorDaniel Baumann <daniel@debian.org>
Tue, 15 Apr 2008 20:33:01 +0000 (22:33 +0200)
committerDaniel Baumann <daniel@debian.org>
Wed, 9 Mar 2011 16:47:59 +0000 (17:47 +0100)
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
debian/postrm

index 805eb0a..71d71e3 100644 (file)
@@ -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
index 805eb0a..71d71e3 100644 (file)
@@ -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