diff --git a/kdumpctl b/kdumpctl index 6e243a8..28c6074 100755 --- a/kdumpctl +++ b/kdumpctl @@ -1616,7 +1616,7 @@ reset_crashkernel_for_installed_kernel() exit 1 fi - if _is_osbuild && ! grep -q crashkernel= /etc/kernel/cmdline; then + if _is_osbuild && ! grep -qs crashkernel= /etc/kernel/cmdline; then reset_crashkernel "--kernel=$_installed_kernel" return fi diff --git a/kexec-tools.spec b/kexec-tools.spec index 90f9355..8b3fbda 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -262,7 +262,7 @@ mv $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/* $RPM_BUILD_ROOT/%{d %pre # save the old default crashkernel values to /tmp/ when upgrading the package -if ! grep -q "ostree" /proc/cmdline && [ $1 == 2 ] && grep -q get-default-crashkernel /usr/bin/kdumpctl; then +if ! grep -qs "ostree" /proc/cmdline && [ $1 == 2 ] && grep -q get-default-crashkernel /usr/bin/kdumpctl; then kdumpctl get-default-crashkernel kdump > /tmp/old_default_crashkernel 2>/dev/null %ifarch ppc64 ppc64le kdumpctl get-default-crashkernel fadump > /tmp/old_default_crashkernel_fadump 2>/dev/null @@ -304,7 +304,7 @@ fi # try to reset kernel crashkernel value to new default value when upgrading # the package -if ! grep -q "ostree" /proc/cmdline && [ $1 == 2 ]; then +if ! grep -qs "ostree" /proc/cmdline && [ $1 == 2 ]; then kdumpctl reset-crashkernel-after-update rm /tmp/old_default_crashkernel 2>/dev/null %ifarch ppc64 ppc64le