Tech/HowTo/MOTD Reboot Required
Jump to navigation
Jump to search
Found online one day, need to cite the source. I recall altering it a bit for my liking. Debian specific I feel but I can try other distros.
MOTD file
cat /etc/update-motd.d/98-reboot-required #!/bin/sh -e # # helper for update-motd if [ -f /var/run/reboot-required ]; then echo "*** System restart required ***" cat /var/run/reboot-required.pkgs fi
Usage
It works like the following on my NAS
$ ssh 192.168.155.15 Linux SGM-DEN-SRV-07 6.1.0-23-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.99-1 (2024-07-15) x86_64 *** System restart required *** linux-image-6.1.0-25-amd64 linux-image-6.1.0-26-amd64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Fri Oct 4 09:11:53 2024 from 192.168.155.222