What I want to script is something along the lines of:
if [ uname -r is not == highest version of kernel RPM installed ] then echo "You need to reboot to use the latest kernel" fi
The problem is, if the output of
rpm -q kernel
… how do I determine which is higher? I know a simple string sort is not reliable (it will be backwards with this example). Is there a shortcut with rpm or do I have to parse out everything and compare it myself?