Don't use die in dracut-module-setup.sh

upstream: fedora
resolves: bz2003832
conflict: none

commit 8b4b7bf808117ccf3a4be5c9dc16ad1f008659a3
Author: Coiby Xu <coxu@redhat.com>
Date:   Fri Mar 26 10:22:09 2021 +0800

    Don't use die in dracut-module-setup.sh

    die (in dracut-lib.sh) is supposed to be used in the initramfs environment.

    Signed-off-by: Coiby Xu <coxu@redhat.com>
    Acked-by: Kairui Song <kasong@redhat.com>

Signed-off-by: Tao Liu <ltao@redhat.com>
This commit is contained in:
Tao Liu 2021-11-03 17:03:30 +08:00
parent dcb59c30d5
commit c373a2c582
1 changed files with 4 additions and 1 deletions

View File

@ -516,7 +516,10 @@ kdump_setup_znet() {
kdump_get_ip_route()
{
local _route=$(/sbin/ip -o route get to $1 2>&1)
[ $? != 0 ] && die "Bad kdump network destination: $1"
if [[ $? != 0 ]]; then
derror "Bad kdump network destination: $1"
exit 1
fi
echo $_route
}