ea3f4dd459
ensure 4 spaces indentation is used everywhere. Change-Id: Ieb48faacb4c96b7b358771d70c17f2f22d0354f4
29 lines
777 B
Bash
Executable file
29 lines
777 B
Bash
Executable file
#!/bin/bash
|
|
# Trigger a run of dkms for all the modules installed
|
|
# to ensure we have valid modules build for all.
|
|
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
modules=$(dkms status | tr ',:' ' ' | awk '{ print $1 "/" $2 }')
|
|
kernels=$(ls /usr/src/linux-headers-*-*-* -d | sed -e 's|/usr/src/linux-headers-||' || echo "")
|
|
# NOTE(bnemec): On Fedora, the versions can be found in /usr/src/kernels
|
|
if [ -z "$kernels" ]; then
|
|
kernels=$(ls /usr/src/kernels/* -d | sed -e 's|/usr/src/kernels/||' || echo "")
|
|
fi
|
|
if [ -z "$kernels" ]; then
|
|
echo "Warning: No kernel versions found for DKMS"
|
|
fi
|
|
__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
|