Skip reading /etc/defaut/grub for s390x

Resolves: bz2133129
Upstream: Fedora
Conflict: None

commit fdad7d9869
Author: Coiby Xu <coxu@redhat.com>
Date:   Thu Sep 29 12:35:00 2022 +0800

    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>

Signed-off-by: Coiby Xu <coxu@redhat.com>
This commit is contained in:
Coiby Xu 2022-10-27 14:45:23 +08:00
parent a9968490a2
commit 7266bb9a7e
1 changed files with 4 additions and 0 deletions

View File

@ -1643,6 +1643,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