From abc2524a5cddb3280c55712708e52cd90cd4cb81 Mon Sep 17 00:00:00 2001 From: Denys Mischenko Date: Wed, 11 May 2022 22:12:17 +0300 Subject: [PATCH] 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 --- diskimage_builder/elements/dkms/post-install.d/97-dkms | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diskimage_builder/elements/dkms/post-install.d/97-dkms b/diskimage_builder/elements/dkms/post-install.d/97-dkms index 9c54220b..47019d05 100755 --- a/diskimage_builder/elements/dkms/post-install.d/97-dkms +++ b/diskimage_builder/elements/dkms/post-install.d/97-dkms @@ -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