diff --git a/kdump-lib.sh b/kdump-lib.sh index 6fcf9fa..75d55f5 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -658,12 +658,13 @@ _get_kdump_kernel_version() fi _version=$(uname -r) - if [[ ! "$_version" =~ \+debug$ ]]; then + if [[ ! "$_version" =~ [+|-]debug$ ]]; then echo "$_version" return fi _version_nondebug=${_version%+debug} + _version_nondebug=${_version_nondebug%-debug} if [[ -f "$(prepare_kdump_kernel "$_version_nondebug")" ]]; then dinfo "Use of debug kernel detected. Trying to use $_version_nondebug" echo "$_version_nondebug"