From fc77a4c00a2a60f6ac48fd40460644339e465109 Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Fri, 4 Sep 2020 06:26:13 +0000 Subject: [PATCH] update check_kernel_headers() for Ubuntu header packages --- install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install.sh b/install.sh index c9fca53..1d8370b 100755 --- a/install.sh +++ b/install.sh @@ -80,6 +80,10 @@ function check_kernel_headers() { [ "X$VER_RUN" == "X$VER_HDR" ] && { return 0 } + VER_HDR=$(dpkg -L linux-headers-$VER_RUN | egrep -m1 "/lib/modules/[[:print:]]+/build" | awk -F'/' '{ print $4; }') + [ "X$VER_RUN" == "X$VER_HDR" ] && { + return 0 + } # echo RUN=$VER_RUN HDR=$VER_HDR echo " !!! Your kernel version is $VER_RUN"