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(a)redhat.com>
Reviewed-by: Pingfan Liu <piliu(a)redhat.com>
---
kdump-lib.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kdump-lib.sh b/kdump-lib.sh
index 3b29c4d..3f2ab6b 100755
--- a/kdump-lib.sh
+++ b/kdump-lib.sh
@@ -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
--
2.41.0