early-kdump: Use consistent symbol link for kernel and initramfs

There is no need to follow user's configuration when installtion the
kernel and initramfs for early kdump, just use a fixed a symbol link is
enough, this help avoid a check_boot_dir call.

Signed-off-by: Kairui Song <kasong@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
This commit is contained in:
Kairui Song 2020-07-27 01:37:19 +08:00
parent a7199c141c
commit c76820bddd
2 changed files with 4 additions and 6 deletions

View File

@ -58,8 +58,8 @@ install() {
inst_binary "$KDUMP_KERNEL"
inst_binary "$KDUMP_INITRD"
ln_r "$KDUMP_KERNEL" "${KDUMP_BOOTDIR}/${KDUMP_IMG}-earlykdump${KDUMP_IMG_EXT}"
ln_r "$KDUMP_INITRD" "${KDUMP_BOOTDIR}/initramfs-earlykdump.img"
ln_r "$KDUMP_KERNEL" "/boot/kernel-earlykdump"
ln_r "$KDUMP_INITRD" "/boot/initramfs-earlykdump"
chmod -x "${initdir}/$KDUMP_KERNEL"
}

View File

@ -16,10 +16,8 @@ EARLY_KEXEC_ARGS=""
prepare_parameters()
{
EARLY_KDUMP_CMDLINE=$(prepare_cmdline "${KDUMP_COMMANDLINE}" "${KDUMP_COMMANDLINE_REMOVE}" "${KDUMP_COMMANDLINE_APPEND}")
KDUMP_BOOTDIR=$(check_boot_dir "${KDUMP_BOOTDIR}")
EARLY_KDUMP_KERNEL="${KDUMP_BOOTDIR}/${KDUMP_IMG}-earlykdump${KDUMP_IMG_EXT}"
EARLY_KDUMP_INITRD="${KDUMP_BOOTDIR}/initramfs-earlykdump.img"
EARLY_KDUMP_KERNEL="/boot/kernel-earlykdump"
EARLY_KDUMP_INITRD="/boot/initramfs-earlykdump"
}
early_kdump_load()