Running kernel compared to installed kernel version

This script will find the running kernel version and compare it to the latest installed version (through apt!)

Tested on Debian Etch, Debian Lenny and Ubuntu Server 8.04 LTS.

The script returns a warning when the installed version is higher than the running version, telling you that there is a reboot required.

We use it to track system maintenance status, as not all systems can be rebooted at request.

Update 2009-05-05: Added support for Debian Lenny.

Update 2010-01-04: Updated support for Debian Lenny.