None
EN
Quick hack: Patching kernel modules using DKMS
['Quick Hack', 'Patching Kernel Modules Using Dkms', 'Frederic Danis']
Collabora Newsroom RSS Feed
During the module installation, DKMS performs a module version sanity check and does not replace the module if the version of the built module is not greater than the one already installed. #!/bin/bash # kernelver is not set on kernel upgrade from apt, but DPKG_MAINTSCRIPT_PACKAGE # contains the kernel image or header package upgraded if [ -z "$kernelver" ] ; then echo "using DPKG_MAINTSCRIPT_PACKAGE instead of unset kernelver" kernelver=$( echo $DPKG_MAINTSCRIPT_PACKAGE | sed -r 's/linux-(headers|image)-//') fi vers=(${kernelver//./ }) # split kernel version into individual elements major="${vers[0]}" minor="${vers[1]}" version="$major.$minor" # recombine as needed # In Debian (and some Debian derivatives), the linux headers are split in # two packages: an arch-specific and an…