Since a technical solution is likely not possible (as described above), just make the error message a little more practical. While the message provided is perfectly accurate, a clearer message might make users less jumpy when it 'breaks.' Something along the lines of:
if (kernel_modules_version < virtualbox-ose-modules_version) than
errormsg="kernel headers do not match virtualbox modules. Reboot and start with previous kernel or see the forums for the latest virtualbox modules"
Since a technical solution is likely not possible (as described above), just make the error message a little more practical. While the message provided is perfectly accurate, a clearer message might make users less jumpy when it 'breaks.' Something along the lines of: modules_ version < virtualbox- ose-modules_ version) than
if (kernel_
errormsg="kernel headers do not match virtualbox modules. Reboot and start with previous kernel or see the forums for the latest virtualbox modules"