summaryrefslogtreecommitdiffstats
path: root/config/chroot_local-hooks/50-dkms
diff options
context:
space:
mode:
Diffstat (limited to 'config/chroot_local-hooks/50-dkms')
-rwxr-xr-xconfig/chroot_local-hooks/50-dkms9
1 files changed, 9 insertions, 0 deletions
diff --git a/config/chroot_local-hooks/50-dkms b/config/chroot_local-hooks/50-dkms
index 1f7b783..bbf243f 100755
--- a/config/chroot_local-hooks/50-dkms
+++ b/config/chroot_local-hooks/50-dkms
@@ -25,6 +25,15 @@ apt-get install --yes \
"linux-headers-${KERNEL_VERSION}-686" \
virtualbox-guest-dkms
+MODULES_VERSION="$(dpkg-query -W -f='${Version}\n' virtualbox-guest-dkms \
+ | sed -E 's,-.*,,')"
+dkms build \
+ -a i386 -k "${KERNEL_VERSION}-686" \
+ -m virtualbox-guest -v "$MODULES_VERSION"
+dkms install \
+ -a i386 -k "${KERNEL_VERSION}-686" \
+ -m virtualbox-guest -v "$MODULES_VERSION"
+
# clean the build directory
rm -r /var/lib/dkms/virtualbox-guest/