From efe4e28b7b0516273d2f58327ac681b23a5bedc0 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Tue, 19 Sep 2023 12:52:30 +0200 Subject: [PATCH] daily autocommit --- .etckeeper | 1 + update-motd.d/70-need-reboot | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 update-motd.d/70-need-reboot diff --git a/.etckeeper b/.etckeeper index 75755f5..f141fc7 100755 --- a/.etckeeper +++ b/.etckeeper @@ -2672,6 +2672,7 @@ maybe chmod 0755 'update-motd.d/20-release' maybe chmod 0755 'update-motd.d/40-tail' maybe chmod 0755 'update-motd.d/50-fortune' maybe chmod 0755 'update-motd.d/60-ddate' +maybe chmod 0755 'update-motd.d/70-need-reboot' maybe chmod 0644 'updatedb.conf' maybe chmod 0644 'vdpau_wrapper.cfg' maybe chmod 0755 'vim' diff --git a/update-motd.d/70-need-reboot b/update-motd.d/70-need-reboot new file mode 100755 index 0000000..e05ff7d --- /dev/null +++ b/update-motd.d/70-need-reboot @@ -0,0 +1,18 @@ +#!/bin/bash + +CYAN="\033[38;5;14m" +NORMAL="\033[39m" + +if [[ -f /run/reboot-required ]] ; then + echo + echo -e "❗❗😯💣 The host needs to be rebootet! 💣😯❗❗" + echo + if [[ -f /run/reboot-required.pkgs ]] ; then + echo "The following packages were changed:" + for p in $( cat /run/reboot-required.pkgs ) ; do + echo -e " * ${CYAN}${p}${NORMAL}" + done + echo + fi +fi + -- 2.39.5