I have a scenario where I need to recompile my display drivers after kernel updates. I'm trying to shome how automate it with bash scripts during boot time. so I need some sort of a way to know that my kernel changed and reinstalled my drivers with the new running kernel.
I was thinking of when first installing my drivers output the kernel version to a file and in my script always checking if this file content is different than what is now installed.
is this the right way? I would appreciate any suggestion on how to know if the kernel changed since I last installed my drivers.
- I know there is DKMS and that is exactly what is for but not always it's working so I want to this this in a different way.