Adopted dkms element to work on Ubuntu Jammy and nvidia drivers

Previously a module version was splitted from the module name:

  nvidia, 510.47.03, 5.4.0-109-generic, x86_64: installed

In Jammy it is now a part of the name:

  nvidia/510.47.03, 5.15.0-27-generic, x86_64: installed

Assuming the fact that it would be threatted as a path this change
doesn't brake anything which was working before. But at the same
time it allows to pass last step where dkms is requested to build all
modules.

Change-Id: Ic1bb2b45f9db906b64ca03ae5c4e05b2114f2a74
This commit is contained in:
Denys Mischenko 2022-05-11 22:12:17 +03:00 committed by Dmitriy Rabotyagov
parent e36b78cef6
commit abc2524a5c

View File

@ -8,7 +8,7 @@ fi
set -eu
set -o pipefail
modules=$(dkms status | tr ',:' ' ' | awk '{ print $1 "/" $2 }')
modules=$(dkms status | tr ',:/' ' ' | awk '{ print $1 "/" $2 }')
kernels=$(ls /usr/src/linux-headers-*-*-* -d | sed -e 's|/usr/src/linux-headers-||' || echo "")
# NOTE(bnemec): On Fedora, the versions can be found in /usr/src/kernels
if [ -z "$kernels" ]; then