fix incorrect usage of rpm-ostree to update kernel command line parameters

CoreOS/Atomic/Silverblue use "rpm-ostree kargs" to manage kernel command
line parameters.

Fixes: 86130ec ("kdumpctl: Add kdumpctl reset-crashkernel")

Reviewed-by: Pingfan Liu <piliu@redhat.com>
Reviewed-by: Philipp Rudo <prudo@redhat.com>
Signed-off-by: Coiby Xu <coxu@redhat.com>
This commit is contained in:
Coiby Xu 2021-12-13 10:57:13 +08:00
parent 945cbbd59b
commit 12ecbce359

View File

@ -1370,9 +1370,9 @@ reset_crashkernel()
if is_atomic; then if is_atomic; then
if rpm-ostree kargs | grep -q "crashkernel="; then if rpm-ostree kargs | grep -q "crashkernel="; then
rpm-ostree --replace="crashkernel=$crashkernel_default" rpm-ostree kargs --replace="crashkernel=$crashkernel_default"
else else
rpm-ostree --append="crashkernel=$crashkernel_default" rpm-ostree kargs --append="crashkernel=$crashkernel_default"
fi fi
else else
entry=$(grubby --info ALL | grep "^kernel=.*$kernel") entry=$(grubby --info ALL | grep "^kernel=.*$kernel")