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 <jieli@redhat.com>
Reviewed-by: Philipp Rudo <prudo@redhat.com>
Signed-off-by: Coiby Xu <coxu@redhat.com>
This commit is contained in:
Coiby Xu 2022-09-29 12:35:00 +08:00
parent 6ce4b85bb3
commit fdad7d9869
1 changed files with 4 additions and 0 deletions

View File

@ -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