needrestart - pending kernel updates
needrestart tries to detect if the running kernel is not the most recent
one installed. needrestart suggests to reboot the system if a outdated
kernel is detected.
needrestart uses the following heuristic:
1) Search for kernel image files in /boot and try to extract their
version string using `strings` and some ugly regex magic. The result
should be a line like:
3.13-1-amd64 (email@example.com) #1 SMP Debian 3.13.10-1
2) If the first token (3.13-1-amd64) is equal to the current version
(taken from /proc/version) we are running an ABI compatible kernel. But
it might be obsolete since we did only check the full version number
=> split the extracted string at spaces and check that every token is
found in /proc/version - if one token is missing, we are running an
obsolete kernel and a reboot will be suggested.
3) If there is a kernel with a higher version number a reboot is