summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2008-04-15 22:33:01 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:47:59 +0100
commitb9590afc81e0ef83eb4252f68c3ec41fc88a7756 (patch)
treeaf995eba9bc5d1dbafb6e065368c5d126dd95f40
parent55d0448c2b0bef163092e251879047d92a58c91e (diff)
downloadlive-boot-b9590afc81e0ef83eb4252f68c3ec41fc88a7756.tar.gz
live-boot-b9590afc81e0ef83eb4252f68c3ec41fc88a7756.zip
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).
-rw-r--r--debian/postinst2
-rw-r--r--debian/postrm2
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