From f69370b84125540d9c6943b82a9a319b3ca42370 Mon Sep 17 00:00:00 2001 From: Marcel Hellwig Date: Wed, 28 Jun 2023 09:23:38 +0200 Subject: [PATCH] fix detection of kernel modules on 64-bit image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The lib modules folder looks like `/lib/modules/6.1.21-v8+/build`, which means that the previous regex doesn't capture anything after the `-` and therefore it fails to detect the kernel version. The regex now aligns with the other detection method and this works fine on my machineā„¢ --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 0e65d9e..e0b6510 100755 --- a/install.sh +++ b/install.sh @@ -78,7 +78,7 @@ function get_kernel_version() { function check_kernel_headers() { VER_RUN=$(get_kernel_version) - VER_HDR=$(dpkg -L raspberrypi-kernel-headers | egrep -m1 "/lib/modules/[^-]+/build" | awk -F'/' '{ print $4; }') + VER_HDR=$(dpkg -L raspberrypi-kernel-headers | egrep -m1 "/lib/modules/[[:print:]]+/build" | awk -F'/' '{ print $4; }') [ "X$VER_RUN" == "X$VER_HDR" ] && { return 0 }