diskimage-builder/elements/base/post-install.d/99-dkms
Robert Collins c713e44ad8 Move package install of dkms to install.d.
Change-Id: I04bebdc9162915e0789fc374c172adc73079a227
2013-05-27 12:12:47 +12:00

20 lines
456 B
Bash
Executable File

#!/bin/sh
# Trigger a run of dkms for all the modules installed
# to ensure we have valid modules build for all.
modules=$(dkms status | tr ',:' ' ' | awk '{ print $1 "/" $2 }')
kernels=$(ls /usr/src/linux-headers-*-*-* -d | sed -e 's|/usr/src/linux-headers-||')
__ARCH=$ARCH
unset ARCH
for module in $modules ; do
for kernel in $kernels ; do
dkms build $module -k $kernel
dkms install $module -k $kernel
done
done
ARCH=$__ARCH
dkms status