4

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.

Yang
  • 1,665
  • 6
  • 21
  • 35

1 Answers1

5

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
Andrew
  • 8,002
  • 3
  • 36
  • 44