Let _update_kernel_cmdline return the correct return code
Currently, for non-s390x systems, the return code is 1 even when _update_kernel_cmdline is correctly executed. This makes callers like reset_crashkernel_after_update fail to print a message if a kernel has its crashkernel updated. Fix it by put the code inside if block for s390x. Signed-off-by: Coiby Xu <coxu@redhat.com> Reviewed-by: Philipp Rudo <prudo@redhat.com>
This commit is contained in:
parent
443a43e075
commit
cdc0253a3c
6
kdumpctl
6
kdumpctl
@ -1445,7 +1445,11 @@ _update_kernel_cmdline()
|
|||||||
grubby --args="fadump=$_fadump_val" --update-kernel "$_kernel_path"
|
grubby --args="fadump=$_fadump_val" --update-kernel "$_kernel_path"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
[[ -f /etc/zipl.conf ]] && zipl > /dev/null
|
|
||||||
|
# Don't use "[[ CONDITION ]] && COMMAND" which returns 1 under false CONDITION
|
||||||
|
if [[ -f /etc/zipl.conf ]]; then
|
||||||
|
zipl > /dev/null
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
_valid_grubby_kernel_path()
|
_valid_grubby_kernel_path()
|
||||||
|
Loading…
Reference in New Issue
Block a user