]> Frank Brehm's Git Trees - config/ns1/etc.git/commitdiff
daily autocommit
authorFrank Brehm <frank@brehm-online.com>
Tue, 19 Sep 2023 10:52:30 +0000 (12:52 +0200)
committerFrank Brehm <frank@brehm-online.com>
Tue, 19 Sep 2023 10:52:30 +0000 (12:52 +0200)
.etckeeper
update-motd.d/70-need-reboot [new file with mode: 0755]

index 75755f5724ccd03ad6a587aed01e1a746498f31d..f141fc79b8734d15208784a8e6af511f1fc85ce9 100755 (executable)
@@ -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 (executable)
index 0000000..e05ff7d
--- /dev/null
@@ -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
+