]> Frank Brehm's Git Trees - config/ns3/etc.git/commitdiff
saving uncommitted changes in /etc prior to apt run
authorFrank Brehm <frank@brehm-online.com>
Tue, 19 Sep 2023 10:35:08 +0000 (12:35 +0200)
committerFrank Brehm <frank@brehm-online.com>
Tue, 19 Sep 2023 10:35:08 +0000 (12:35 +0200)
.etckeeper
cron.d/greetings
letsencrypt/.certbot.lock [deleted file]
update-motd.d/20-release [new file with mode: 0755]
update-motd.d/40-tail [new file with mode: 0755]
update-motd.d/50-fortune [new file with mode: 0755]
update-motd.d/60-ddate [new file with mode: 0755]
update-motd.d/70-need-reboot [new file with mode: 0755]

index eee84105260da22c85f3ffc3b91155968351df66..54ffd85dc316371091a0f9162e481280b590b314 100755 (executable)
@@ -1177,7 +1177,6 @@ maybe chown 'openldap' 'ldap/slapd.d/cn=config/olcDatabase={1}mdb.ldif'
 maybe chgrp 'openldap' 'ldap/slapd.d/cn=config/olcDatabase={1}mdb.ldif'
 maybe chmod 0600 'ldap/slapd.d/cn=config/olcDatabase={1}mdb.ldif'
 maybe chmod 0755 'letsencrypt'
-maybe chmod 0600 'letsencrypt/.certbot.lock'
 maybe chmod 0644 'letsencrypt/.updated-options-ssl-apache-conf-digest.txt'
 maybe chmod 0700 'letsencrypt/accounts'
 maybe chmod 0700 'letsencrypt/accounts/acme-staging-v02.api.letsencrypt.org'
@@ -2097,6 +2096,11 @@ maybe chmod 0644 'ufw/applications.d/salt-master/salt.ufw'
 maybe chmod 0600 'ulogd.conf'
 maybe chmod 0755 'update-motd.d'
 maybe chmod 0755 'update-motd.d/10-uname'
+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 0755 'vim'
 maybe chmod 0644 'vim/vimrc'
index a3bf1b483df84b22ed124e4114c9cca2b229137a..2d6a091b21eb11f19bf8afe313db3ae8caa4ec7e 100644 (file)
@@ -1,3 +1,3 @@
 # Eine nette Begrüßung ...
-1,11,21,31,41,51  *   *  *  *   root test -x /root/bin/generate-motd.sh && /root/bin/generate-motd.sh >/dev/null
-@reboot                         root test -x /root/bin/generate-motd.sh && /root/bin/generate-motd.sh >/dev/null
+1,11,21,31,41,51  *   *  *  *   root test -x /root/bin/generate-motd.sh && /root/bin/generate-motd.sh >/dev/null
+@reboot                         root test -x /root/bin/generate-motd.sh && /root/bin/generate-motd.sh >/dev/null
diff --git a/letsencrypt/.certbot.lock b/letsencrypt/.certbot.lock
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/update-motd.d/20-release b/update-motd.d/20-release
new file mode 100755 (executable)
index 0000000..9bfecd5
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+if [[ -f /etc/gentoo-release ]] ; then
+    cat /etc/gentoo-release
+elif [[ -x /usr/bin/lsb_release ]] ; then
+    /usr/bin/lsb_release -d | sed -e 's/^[     ]*Description[  ]*:[    ]*//'
+fi
+
+# vim: ts=4 expandtab
diff --git a/update-motd.d/40-tail b/update-motd.d/40-tail
new file mode 100755 (executable)
index 0000000..d1ba165
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+if [[ -f /etc/motd.tail ]] ; then
+    cat /etc/motd.tail
+fi
+
+# vim: ts=4 expandtab
diff --git a/update-motd.d/50-fortune b/update-motd.d/50-fortune
new file mode 100755 (executable)
index 0000000..15a3c7a
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+export LC_ALL=de_DE.utf8
+
+if [[ -x /usr/bin/fortune ]] ; then
+    echo
+    /usr/bin/fortune de
+elif [[ -x /usr/games/fortune ]] ; then
+    echo >>"${MOTD}"
+    /usr/games/fortune de
+fi
+
+# vim: ts=4 expandtab
diff --git a/update-motd.d/60-ddate b/update-motd.d/60-ddate
new file mode 100755 (executable)
index 0000000..8a6371e
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+if type -p ddate >/dev/null; then
+    ddate
+fi
+
+echo
+
+# vim: ts=4 expandtab
diff --git a/update-motd.d/70-need-reboot b/update-motd.d/70-need-reboot
new file mode 100755 (executable)
index 0000000..de73b56
--- /dev/null
@@ -0,0 +1,17 @@
+#!/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