From 3aeb03c97e328576a0115f785144fa2f37cae2f7 Mon Sep 17 00:00:00 2001 From: Coiby Xu Date: Mon, 19 Sep 2022 09:04:55 +0800 Subject: [PATCH] skip updating /etc/default/grub for s390x Resolves: bz2104534 Upstream: Fedora Conflict: None commit e8ae8975958d2b2d2a5f3853d82cdd95ef4bb653 Author: Coiby Xu Date: Tue Jul 12 14:06:25 2022 +0800 skip updating /etc/default/grub for s390x Resolves: bz2104534 When running "kdumpctl reset-crashkernel --kernel=ALL" on s390x, sed: can't read /etc/default/grub: No such file or directory sed: can't read /etc/default/grub: No such file or directory This happens because s390x doesn't use the grub bootloader and /etc/default/grub doesn't exist. Reported-by: smitterl@redhat.com Reviewed-by: Philipp Rudo Signed-off-by: Coiby Xu Signed-off-by: Coiby Xu --- kdumpctl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kdumpctl b/kdumpctl index 989da79..104574b 100755 --- a/kdumpctl +++ b/kdumpctl @@ -1456,6 +1456,10 @@ _update_kernel_arg_in_grub_etc_default() { local _para=$1 _val=$2 _para_val + if [[ $(uname -m) == s390x ]]; then + return + fi + if [[ -n $_val ]]; then _para_val="$_para=$_val" fi