aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/update-motd
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2017-02-25 01:25:59 +0100
committerDavid Runge <dave@sleepmap.de>2017-02-25 01:25:59 +0100
commitaa6c19665c133d61b9f99fac74e63d84712aa928 (patch)
tree6be28729c3b026b620998d2617ba1aec0f707be3 /scripts/update-motd
parenta71ef698ac1a45530d2dfa8f1b1571769e96c61c (diff)
downloaduenv-0.8.6.tar.gz
uenv-0.8.6.tar.bz2
uenv-0.8.6.tar.xz
uenv-0.8.6.zip
user/postpone-screensaver.service: Moving executable to /usr/bin. scripts/{postpone-screensaver,update-motd}: moving to bin subfolder for better distinction from scripts.0.8.6
Diffstat (limited to 'scripts/update-motd')
-rwxr-xr-xscripts/update-motd51
1 files changed, 0 insertions, 51 deletions
diff --git a/scripts/update-motd b/scripts/update-motd
deleted file mode 100755
index 8fe4c81..0000000
--- a/scripts/update-motd
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/env bash
-
-set -euo pipefail
-
-# get the hostname
-if [ -s /etc/motd.name ]; then
- cat /etc/motd.name > /tmp/motd
-elif [ -x /usr/bin/banner ]; then
- cat /etc/hostname | banner -w 80 > /tmp/motd
-else
- cat /etc/hostname > /tmp/motd
-fi
-echo >> /tmp/motd
-
-# get additional info
-if [ -s /etc/motd.info ]; then
- cat /etc/motd.info >> /tmp/motd
- echo >> /tmp/motd
-fi
-
-# get currently running kernel version
-uname -a >> /tmp/motd
-echo >> /tmp/motd
-
-# update package cache
-pacman -Sy 2>&1 > /dev/null
-pacman -Qu > /tmp/updates
-# show updatable packages
-if [ -s /tmp/updates ]; then
- echo "Package updates available:" >> /tmp/motd
- cat /tmp/updates >> /tmp/motd
- echo >> /tmp/motd
-fi
-
-if [ -x /usr/bin/arch-audit ]; then
- arch-audit -uf "%n|%c" >> /tmp/cves
- if [ -s /tmp/cves ]; then
- echo "Security updates needed:" >> /tmp/motd
- cat /tmp/cves >> /tmp/motd
- fi
-else
- echo "Install arch-audit for information on CVEs." >> /tmp/motd
-fi
-
-# move all to /etc/motd
-if [ -x /usr/bin/lolcat ]; then
- lolcat /tmp/motd > /etc/motd
-else
- cat /tmp/motd > /etc/motd
-fi
-