From fdad7d9869a9637e6799cce222d386aed0b8781e Mon Sep 17 00:00:00 2001 From: Coiby Xu Date: Thu, 29 Sep 2022 12:35:00 +0800 Subject: [PATCH] Skip reading /etc/defaut/grub for s390x Currently, updating kexec-tools on s390x gives the warning sed: can't read /etc/default/grub: No such file or directory This happens because s390x doesn't use GRUB and /etc/default/grub doesn't exist. We need to skip both reading and writing to /etc/default/grub. Reported-by: Jie Li Reviewed-by: Philipp Rudo Signed-off-by: Coiby Xu --- kdumpctl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kdumpctl b/kdumpctl index 42c839b..d4d196f 100755 --- a/kdumpctl +++ b/kdumpctl @@ -1626,6 +1626,10 @@ update_crashkernel_in_grub_etc_default_after_update() return fi + if [[ $(uname -m) == s390x ]]; then + return + fi + _crashkernel=$(_read_kernel_arg_in_grub_etc_default crashkernel) if [[ -z $_crashkernel ]]; then