kexec-tools/60-kdump.install
Petr Šabata f5bf4978d8 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/kexec-tools#041ba89902961b5490a7143d9596dc00d732cba0
2020-10-15 14:45:57 +02:00

31 lines
549 B
Bash
Executable File

#!/usr/bin/bash
COMMAND="$1"
KERNEL_VERSION="$2"
BOOT_DIR_ABS="$3"
KERNEL_IMAGE="$4"
if ! [[ ${KERNEL_INSTALL_MACHINE_ID-x} ]]; then
exit 0
fi
if [[ -d "$BOOT_DIR_ABS" ]]; then
KDUMP_INITRD="initrdkdump"
else
BOOT_DIR_ABS="/boot"
KDUMP_INITRD="initramfs-${KERNEL_VERSION}kdump.img"
fi
ret=0
case "$COMMAND" in
add)
# Do nothing, kdump initramfs is strictly host only
# and managed by kdump service
;;
remove)
rm -f -- "$BOOT_DIR_ABS/$KDUMP_INITRD"
ret=$?
;;
esac
exit $ret