How to find out kernel version in a shell script?
How do I find out the version of the kernel running in a bash shell script? If this is not possible, can anyone tell me a work-around for the following problem?:
I have an application that requires the initial configuration (VMware) to be specific to the kernel that it is to be run under. I configured it to 2.4.x and it worked fine, however I added the 2.6.7 kernel to lilo as an additional option. I tried to run the startup script under 2.6.7 and it obviously said it was not configured correctly.
After returning to 2.4.x, I found that trying to run under 2.6.7 altered the configuration and it was not reconfigurable, therefore I had to reinstall, recompile, and reconfigure. I would like to make it so the startup script does not run if the running kernel is not 2.4.x. Is there a way to do this? Thanks.
ta0kira
|