92-crashkernel.install: fix exit code

The return value of set_ck_kernel or set_grub_ck is wrongly being used
as the exit code. This hook should exit with 0 or it may result in
unexpected behavior of kernel-install.

Signed-off-by: Kairui Song <kasong@redhat.com>
Acked-by: Pingfan Liu <piliu@redhat.com>
This commit is contained in:
Kairui Song 2021-09-01 17:38:50 +08:00
parent 4c39ad9a0c
commit f6e6aa4551

View File

@ -120,8 +120,9 @@ add)
if [[ "$boot_ck_cmdline" != "$inst_ck_default" ]] && [[ "$boot_ck_cmdline" == "$boot_ck_default" ]]; then
set_kernel_ck "$KERNEL_VERSION" "$inst_ck_default"
fi
;;
exit 0
;;
remove)
# If grub default value is upgraded when this kernel was installed, try downgrade it
grub_etc_ck=$(get_grub_etc_ck)
@ -139,5 +140,7 @@ remove)
set_grub_ck "$highest_ck_default"
fi
fi
exit 0
;;
esac