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:
parent
4c39ad9a0c
commit
f6e6aa4551
@ -120,8 +120,9 @@ add)
|
|||||||
if [[ "$boot_ck_cmdline" != "$inst_ck_default" ]] && [[ "$boot_ck_cmdline" == "$boot_ck_default" ]]; then
|
if [[ "$boot_ck_cmdline" != "$inst_ck_default" ]] && [[ "$boot_ck_cmdline" == "$boot_ck_default" ]]; then
|
||||||
set_kernel_ck "$KERNEL_VERSION" "$inst_ck_default"
|
set_kernel_ck "$KERNEL_VERSION" "$inst_ck_default"
|
||||||
fi
|
fi
|
||||||
;;
|
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
remove)
|
remove)
|
||||||
# If grub default value is upgraded when this kernel was installed, try downgrade it
|
# If grub default value is upgraded when this kernel was installed, try downgrade it
|
||||||
grub_etc_ck=$(get_grub_etc_ck)
|
grub_etc_ck=$(get_grub_etc_ck)
|
||||||
@ -139,5 +140,7 @@ remove)
|
|||||||
set_grub_ck "$highest_ck_default"
|
set_grub_ck "$highest_ck_default"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user