An update to the patch, when removing a kernel, the vmlinuz can not be
found. Use the initrd and fall back to $BOOTDIR.
--8<---------------cut here---------------start------------->8---
git log 8f450c414eb5fb95b4a0003ae6a9a8677ea2fda7..94d1cd485957e08093cff9b33477a41f6da4edd8
commit 94d1cd485957e08093cff9b33477a41f6da4edd8
Author: Daniel Dehennin <dad@hati.baby-gnu.org>
Date: Sat Dec 5 17:16:12 2009 +0100
Fix kernel removing case.
* update-initramfs (get_linux_dir): If the kernel is not present, find the initrd, fall back to default $BOOTDIR.
git diff --stat 8f450c414eb5fb95b4a0003ae6a9a8677ea2fda7..94d1cd485957e08093cff9b33477a41f6da4edd8
update-initramfs | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
--8<---------------cut here---------------end--------------->8---
--
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1
diff --git a/update-initramfs b/update-initramfs
index 7f61c7d..3703e19 100755
--- a/update-initramfs
+++ b/update-initramfs
@@ -90,8 +90,14 @@ version_exists()
get_linux_dir()
{
+ linux_dir=${BOOTDIR}
linux=$(find ${BOOTDIR} -type f -name "vmlinu[xz]-$1" 2>/dev/null)
- linux_dir=$(dirname $linux)
+ if [ -z "$linux" ]; then
+ initrd=$(find ${BOOTDIR} -type f -name "initrd.img-$1" 2>/dev/null)
+ [ -n "$initrd" ] && linux_dir=$(dirname $initrd)
+ else
+ linux_dir=$(dirname $linux)
+ fi
}
set_initramfs()
Attachment:
pgpKESkzNxynf.pgp
Description: PGP signature