On Wed, Sep 1, 2021 at 5:43 PM Kairui Song <kasong(a)redhat.com> wrote:
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(a)redhat.com>
---
92-crashkernel.install | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/92-crashkernel.install b/92-crashkernel.install
index 7613bc66..90678c88 100755
--- a/92-crashkernel.install
+++ b/92-crashkernel.install
@@ -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
Acked-by: Pingfan Liu <piliu(a)redhat.com>