If the attacker can modify the kernel then I think you have already lost the battle. This script, as it says in README, checks that the files in /boot have not been altered between reboots.
By that argument, if the attacker can modify the contents of /boot then you've lost and this doesn't buy you anything.