summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Lange2021-05-06 15:00:39 +0200
committerMichael Laß2021-05-07 19:32:16 +0200
commit4b6d9af24466ea8bfae0ec8c73964a7a5102eb2b (patch)
tree181ab2cf7bebe562ab6f51246441a22536367d49
parent2fa0fed49d93dc74dafb451979b3cc90bfb9500d (diff)
downloadaur-4b6d9af24466ea8bfae0ec8c73964a7a5102eb2b.tar.gz
openafs-modules: adapted kernel version heuristic to work with lts versions
-rw-r--r--PKGBUILD7
1 files changed, 6 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 31cbbd85921e..c0bc97b50288 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -43,7 +43,12 @@ sha256sums=('53543a561fce67714fec9f2a6bf408c5cc1d061c7dc9d1459458275e8ccbfa79'
# Heuristic to determine version of installed kernel
# You can modify this if the heuristic fails
-_kernelver=$(ls -dt /usr/lib/modules/* | head -n1 | cut -d/ -f5)
+if uname -r | grep -q lts; then
+ # if you are currently running an lts kernel, only consider lts versions
+ _kernelver=$(ls -dt /usr/lib/modules/*lts* | head -n1 | cut -d/ -f5)
+else
+ _kernelver=$(ls -dt /usr/lib/modules/* | head -n1 | cut -d/ -f5)
+fi
_extramodules="/usr/lib/modules/${_kernelver}/extramodules"
prepare() {