On Tue, May 09, 2023 at 05:03:24PM +0200, Philipp Rudo wrote:
Hi Coiby,
On Tue, 9 May 2023 15:01:38 +0800
Coiby Xu <coxu(a)redhat.com> wrote:
> Currently, for non-s390x systems, the return code is 1 even when
> _update_kernel_cmdline is correctly executed. This makes callers like
> reset_crashkernel_after_update fail to print a message if a kernel has
> its crashkernel updated. Fix it by put the code inside if block for
> s390x.
>
> Signed-off-by: Coiby Xu <coxu(a)redhat.com>
> ---
> kdumpctl | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/kdumpctl b/kdumpctl
> index 2c647d6f..edcf2caf 100755
> --- a/kdumpctl
> +++ b/kdumpctl
> @@ -1357,7 +1357,9 @@ _update_kernel_cmdline()
> grubby --args="fadump=$_fadump_val" --update-kernel
"$_kernel_path"
> fi
> fi
> - [[ -f /etc/zipl.conf ]] && zipl > /dev/null
> + if [[ -f /etc/zipl.conf ]]; then
> + zipl > /dev/null
> + fi
Ouch that's a very nasty corner case. Can you add a short comment so
the next "cleanup" doesn't accidentally revert the fix.
Sure, I'll add a comment. Thanks for the suggestion!
Nice catch!
Thanks:)
Philipp
> }
>
> _valid_grubby_kernel_path()
--
Best regards,
Coiby