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>
This commit is contained in:
parent
b92bc6e0a7
commit
980f10aa40
@ -248,7 +248,7 @@ kdump_get_persistent_dev()
|
|||||||
echo $(get_persistent_dev "$dev")
|
echo $(get_persistent_dev "$dev")
|
||||||
}
|
}
|
||||||
|
|
||||||
is_atomic()
|
is_ostree()
|
||||||
{
|
{
|
||||||
grep -q "ostree" /proc/cmdline
|
grep -q "ostree" /proc/cmdline
|
||||||
}
|
}
|
||||||
|
10
kdumpctl
10
kdumpctl
@ -1342,7 +1342,7 @@ _update_grub()
|
|||||||
{
|
{
|
||||||
local _kernel_path=$1 _crashkernel=$2 _dump_mode=$3 _fadump_val=$4
|
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
|
if rpm-ostree kargs | grep -q "crashkernel="; then
|
||||||
rpm-ostree kargs --replace="crashkernel=$_crashkernel"
|
rpm-ostree kargs --replace="crashkernel=$_crashkernel"
|
||||||
else
|
else
|
||||||
@ -1472,13 +1472,13 @@ reset_crashkernel()
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
# 1. CoreOS uses "rpm-ostree kargs" instead of grubby to manage kernel command
|
# 1. OSTree systems use "rpm-ostree kargs" instead of grubby to manage kernel command
|
||||||
# line. --kernel=ALL doesn't make sense for CoreOS.
|
# line. --kernel=ALL doesn't make sense for OStree.
|
||||||
# 2. CoreOS doesn't support POWER so the dump mode is always kdump.
|
# 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
|
# 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
|
# modifying the kernel command line so there is no need for kexec-tools
|
||||||
# to repeat it.
|
# 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')
|
_old_crashkernel=$(rpm-ostree kargs | sed -n -E 's/.*(^|\s)crashkernel=(\S*).*/\2/p')
|
||||||
_new_dump_mode=kdump
|
_new_dump_mode=kdump
|
||||||
_new_crashkernel=$(kdump_get_arch_recommend_crashkernel "$_new_dump_mode")
|
_new_crashkernel=$(kdump_get_arch_recommend_crashkernel "$_new_dump_mode")
|
||||||
|
Loading…
Reference in New Issue
Block a user