kdump-lib: simplify _get_kdump_kernel_version
Only check whether modules for a given kernel version are installed instead of searching for a kernel image. It's safer to assume that every kernel uses kernel modules compared to that it follows certain naming conventions. Furthermore it is much more lightweight and thus allows to determine the KDUMP_KERNELVER much earlier for every command in kdumpctl. Signed-off-by: Philipp Rudo <prudo@redhat.com> Reviewed-by: Pingfan Liu <piliu@redhat.com>
This commit is contained in:
parent
bbda12a5ac
commit
f01fef4016
@ -599,7 +599,7 @@ _get_kdump_kernel_version()
|
||||
|
||||
_version_nondebug=${_version%+debug}
|
||||
_version_nondebug=${_version_nondebug%-debug}
|
||||
if [[ -f "$(prepare_kdump_kernel "$_version_nondebug")" ]]; then
|
||||
if _is_valid_kver "$_version_nondebug"; then
|
||||
dinfo "Use of debug kernel detected. Trying to use $_version_nondebug"
|
||||
echo "$_version_nondebug"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user