summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Heinz Wiesinger2019-03-02 20:48:46 +0100
committer Willy Sudiarto Raharjo2019-03-16 00:53:39 +0100
commit15abf514d2f585bb2991eb7fef5802abb1081009 (patch)
tree719b743bb0ce4ae6d06f411a592ca96f539974f7
parent8b231f09e762a29d49a3ab4715e26c63beddac14 (diff)
downloadslackbuilds-15abf514d2f585bb2991eb7fef5802abb1081009.tar.gz
system/virtualbox-kernel-addons: Fix kernel version check on 32bit
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
-rw-r--r--system/virtualbox-kernel-addons/virtualbox-kernel-addons.SlackBuild10
1 files changed, 8 insertions, 2 deletions
diff --git a/system/virtualbox-kernel-addons/virtualbox-kernel-addons.SlackBuild b/system/virtualbox-kernel-addons/virtualbox-kernel-addons.SlackBuild
index 14cd4888ee..722e60c9b8 100644
--- a/system/virtualbox-kernel-addons/virtualbox-kernel-addons.SlackBuild
+++ b/system/virtualbox-kernel-addons/virtualbox-kernel-addons.SlackBuild
@@ -65,8 +65,14 @@ find -L . \
mkdir -p $PKG/lib/modules/$KERNEL/misc
-KERNEL_MINOR=$(echo $KERNEL | cut -d "." -f 2)
-KERNEL_PATCH=$(echo $KERNEL | cut -d "." -f 3)
+KERNEL_LOCALVERSION=$(zgrep "CONFIG_LOCALVERSION=" /proc/config.gz | cut -d '"' -f 2)
+if [ -z "$KERNEL_LOCALVERSION" ]; then
+ KERNEL_MINOR=$(echo $KERNEL | cut -d "." -f 2)
+ KERNEL_PATCH=$(echo $KERNEL | cut -d "." -f 3)
+else
+ KERNEL_MINOR=$(echo $KERNEL | sed "s|$KERNEL_LOCALVERSION||" | cut -d "." -f 2)
+ KERNEL_PATCH=$(echo $KERNEL | sed "s|$KERNEL_LOCALVERSION||" | cut -d "." -f 3)
+fi
# Work around API break introduced in kernel 4.4.168
if [ "$KERNEL_MINOR" = 4 -a "$KERNEL_PATCH" -ge 168 ]; then