When you install certain updates (e.g. a new kernel) in Ubuntu Desktop, you get an indication that a reboot is required (in Lucid, the logout icon turns red).
How can I check, from the command line, whether an Ubuntu server requires a reboot?
I could grep for 'System restart required' in /etc/motd, but I'd like a solution that's more elegant. Also, I want a solution that works in older releases, e.g. Hardy (8.04 LTS).