How does Ubuntu keep track of the "System restart required" flag in motd?

Posted by Anders Lindahl on Server Fault See other posts from Server Fault or by Anders Lindahl
Published on 2009-12-10T09:33:09Z Indexed on 2011/02/22 23:27 UTC
Read the original article Hit count: 234

Filed under:
|
|

I have a few Ubuntu servers (8.10, 9.10) that is set to automatically install security updates. Some times these updates requires a restart of the system, and this string is shown in motd:

*** System restart required ***

To get a notice about these, I plan to write a Nagios test to monitor if the server is in need of a reboot. So, my question:

Is there a better way than parsing /etc/motd to find out if a reboot is needed?

© Server Fault or respective owner

Related posts about ubuntu

Related posts about nagios