kdump-lib: fix the matching pattern for debug-kernel
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2165839
Upstream: Fedora
Conflict: None
commit 81d3cc344d
Author: Pingfan Liu <piliu@redhat.com>
Date: Thu Apr 20 11:26:34 2023 +0800
kdump-lib: fix the matching pattern for debug-kernel
On aarch64, a 64k kernel's name looks like:
vmlinuz-5.14.0-300.el9.aarch64+64k and the corresponding debug kernel's
name looks like: vmlinuz-5.14.0-300.el9.aarch64+64k-debug, which ends
with the suffix -debug instead of +debug.
Fix the matching pattern by [+|-]debug
Signed-off-by: Pingfan Liu <piliu@redhat.com>
Reviewed-by: Philipp Rudo <prudo@redhat.com>
Signed-off-by: Pingfan Liu <piliu@redhat.com>
This commit is contained in:
parent
4454163cb4
commit
47391b4a6d
@ -658,12 +658,13 @@ _get_kdump_kernel_version()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
_version=$(uname -r)
|
_version=$(uname -r)
|
||||||
if [[ ! "$_version" =~ \+debug$ ]]; then
|
if [[ ! "$_version" =~ [+|-]debug$ ]]; then
|
||||||
echo "$_version"
|
echo "$_version"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_version_nondebug=${_version%+debug}
|
_version_nondebug=${_version%+debug}
|
||||||
|
_version_nondebug=${_version_nondebug%-debug}
|
||||||
if [[ -f "$(prepare_kdump_kernel "$_version_nondebug")" ]]; then
|
if [[ -f "$(prepare_kdump_kernel "$_version_nondebug")" ]]; then
|
||||||
dinfo "Use of debug kernel detected. Trying to use $_version_nondebug"
|
dinfo "Use of debug kernel detected. Trying to use $_version_nondebug"
|
||||||
echo "$_version_nondebug"
|
echo "$_version_nondebug"
|
||||||
|
Loading…
Reference in New Issue
Block a user