summaryrefslogtreecommitdiff
path: root/system/virtualbox-kernel
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@slackbuilds.org>2019-03-02 20:47:58 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-03-16 06:53:39 +0700
commit8b231f09e762a29d49a3ab4715e26c63beddac14 (patch)
tree4bef36294cad47210e4fadd0ee1aae4f91fd7fc5 /system/virtualbox-kernel
parentdf081693faacfc0bab90e1b9bd229122c67ac6f8 (diff)
downloadslackbuilds-8b231f09e762a29d49a3ab4715e26c63beddac14.tar.gz
system/virtualbox-kernel: Fix kernel version check on 32bit systems
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
Diffstat (limited to 'system/virtualbox-kernel')
-rw-r--r--system/virtualbox-kernel/virtualbox-kernel.SlackBuild10
1 files changed, 8 insertions, 2 deletions
diff --git a/system/virtualbox-kernel/virtualbox-kernel.SlackBuild b/system/virtualbox-kernel/virtualbox-kernel.SlackBuild
index d6c0e8a584..d879686802 100644
--- a/system/virtualbox-kernel/virtualbox-kernel.SlackBuild
+++ b/system/virtualbox-kernel/virtualbox-kernel.SlackBuild
@@ -70,8 +70,14 @@ if ! [ "${HARDENING:-yes}" = "yes" ]; then
{vboxdrv,vboxnetadp,vboxnetflt,vboxpci}/Makefile
fi
-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