kdump-lib: clear up references to Atomic/CoreOS
Resolves: bz2174836 Upstream: Fedora Conflict: None commit 980f10aa40852da41907dc0aeb59ad7d3e8f4c30 Author: Dusty Mabe <dusty@dustymabe.com> Date: Wed Jun 22 11:58:31 2022 -0400 kdump-lib: clear up references to Atomic/CoreOS There are many variants on OSTree based systems these days so we should probably refer to the class of systems as "OSTree based systems". Also, Atomic Host is dead. Signed-off-by: Dusty Mabe <dusty@dustymabe.com> Acked-by: Coiby Xu <coxu@redhat.com> Signed-off-by: Lichen Liu <lichliu@redhat.com>
This commit is contained in:
parent
577dc4415a
commit
e47ec659e9
|
@ -254,7 +254,7 @@ kdump_get_persistent_dev()
|
|||
echo $(get_persistent_dev "$dev")
|
||||
}
|
||||
|
||||
is_atomic()
|
||||
is_ostree()
|
||||
{
|
||||
grep -q "ostree" /proc/cmdline
|
||||
}
|
||||
|
|
10
kdumpctl
10
kdumpctl
|
@ -1407,7 +1407,7 @@ _update_kernel_cmdline()
|
|||
{
|
||||
local _kernel_path=$1 _crashkernel=$2 _dump_mode=$3 _fadump_val=$4
|
||||
|
||||
if is_atomic; then
|
||||
if is_ostree; then
|
||||
if rpm-ostree kargs | grep -q "crashkernel="; then
|
||||
rpm-ostree kargs --replace="crashkernel=$_crashkernel"
|
||||
else
|
||||
|
@ -1540,13 +1540,13 @@ reset_crashkernel()
|
|||
esac
|
||||
done
|
||||
|
||||
# 1. CoreOS uses "rpm-ostree kargs" instead of grubby to manage kernel command
|
||||
# line. --kernel=ALL doesn't make sense for CoreOS.
|
||||
# 2. CoreOS doesn't support POWER so the dump mode is always kdump.
|
||||
# 1. OSTree systems use "rpm-ostree kargs" instead of grubby to manage kernel command
|
||||
# line. --kernel=ALL doesn't make sense for OStree.
|
||||
# 2. We don't have any OSTree POWER systems so the dump mode is always kdump.
|
||||
# 3. "rpm-ostree kargs" would prompt the user to reboot the system after
|
||||
# modifying the kernel command line so there is no need for kexec-tools
|
||||
# to repeat it.
|
||||
if is_atomic; then
|
||||
if is_ostree; then
|
||||
_old_crashkernel=$(rpm-ostree kargs | sed -n -E 's/.*(^|\s)crashkernel=(\S*).*/\2/p')
|
||||
_new_dump_mode=kdump
|
||||
_new_crashkernel=$(kdump_get_arch_recommend_crashkernel "$_new_dump_mode")
|
||||
|
|
Loading…
Reference in New Issue