diff --git a/kdump-lib.sh b/kdump-lib.sh index 0c57a38..4c9f664 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -254,7 +254,7 @@ kdump_get_persistent_dev() echo $(get_persistent_dev "$dev") } -is_atomic() +is_ostree() { grep -q "ostree" /proc/cmdline } diff --git a/kdumpctl b/kdumpctl index 7ebeb43..3eb2f73 100755 --- a/kdumpctl +++ b/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")