当我使用apt来更新我的系统(例如运行sudo aptitude full-upgrade )时,它有时会安装需要重启的更新。 这尤其适用。 用于内核(安全)更新。
我有时可以在sshlogin消息中看到这个。 我想知道如何(其他)我可以确定系统是否需要重新启动由于这些更新。
MOTD“需要重新启动”文本是由/usr/lib/update-notifier/update-motd-reboot-required ,它检查/var/run/reboot-required文件是否存在,
#!/ bin / sh -e
#
#helper for update-motd
如果[-f / var / run / reboot-required]; 然后
cat / var / run / reboot-required
科幻