kernel-install: Remove existing initramfs if it's older than the kernel
Currently we fail to install a new kernel with "make install" on the second try, because dracut won't over-write the initramfs without --force. In this patch, 20-grub.install will remove an existing initramfs if it's newer than the kernel we're installing. Resolves: rhbz#1638405 Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
parent
66078fcba2
commit
67aea4f8a5
@ -114,6 +114,12 @@ case "$COMMAND" in
|
||||
fi
|
||||
grub2-editenv - set "saved_entry=${NEWDEFAULT}"
|
||||
|
||||
# this probably isn't the best place to do this, but it will do for now.
|
||||
if [ -e "${BOOTPREFIX}${INITRD}" -a -e "${BOOTPREFIX}${LINUX}" -a \
|
||||
"${BOOTPREFIX}${INITRD}" -ot "${BOOTPREFIX}${LINUX}" -a \
|
||||
-x /usr/lib/kernel/install.d/50-dracut.install ]; then
|
||||
rm -f "${BOOTPREFIX}${INITRD}"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user