dynamic-motd/update-motd.d/40-need-reboot
2020-06-30 16:08:20 +02:00

14 lines
317 B
Bash
Executable file

#!/bin/bash
. /etc/update-motd.d/colors
if [[ -x /usr/sbin/needrestart ]]; then
n=$(cat /var/cache/motd-needrestart)
if [[ $n -gt 0 ]]; then
printf $LIGHT_RED
printf " Pending kernel upgrade! "
printf $NONE
printf "You should consider rebooting your machine.\n\n"
fi
fi