diff --git a/kdumpctl b/kdumpctl index 9bb831a..6e243a8 100755 --- a/kdumpctl +++ b/kdumpctl @@ -1602,6 +1602,11 @@ reset_crashkernel_after_update() done } +_is_osbuild() +{ + [[ $(sed -n -E 's/.*(^|\s)container=(\S*).*/\2/p' < /proc/1/environ) == bwrap-osbuild ]] +} + reset_crashkernel_for_installed_kernel() { local _installed_kernel _running_kernel _crashkernel _crashkernel_running @@ -1611,6 +1616,11 @@ reset_crashkernel_for_installed_kernel() exit 1 fi + if _is_osbuild && ! grep -q crashkernel= /etc/kernel/cmdline; then + reset_crashkernel "--kernel=$_installed_kernel" + return + fi + if ! _running_kernel=$(_get_current_running_kernel_path); then derror "Couldn't find current running kernel" exit