92-crashkernel.install: fix exit code

upstream: fedora
resolves: bz2003832
conflict: none

commit f6e6aa4551
Author: Kairui Song <kasong@redhat.com>
Date:   Wed Sep 1 17:38:50 2021 +0800

    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>

Signed-off-by: Tao Liu <ltao@redhat.com>
This commit is contained in:
Tao Liu 2021-11-03 19:38:17 +08:00
parent 38f981907c
commit 5f12822d8f

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