Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When I use apt to update my system (e.g. run sudo aptitude full-upgrade) it sometimes installs updates that require reboots. This applies esp. for kernel (security) updates.

I can sometimes see this in the ssh login message. I'm wondering how (else) I may determine whether the system needs a reboot due to these updates.

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

The MOTD "restart required" text is generated by /usr/lib/update-notifier/update-motd-reboot-required, which checks for the existence of and pulls text from /var/run/reboot-required:

#!/bin/sh -e
#
# helper for update-motd

if [ -f /var/run/reboot-required ]; then
        cat /var/run/reboot-required
fi
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.