From: Frank Brehm Date: Fri, 28 Oct 2011 08:01:55 +0000 (+0200) Subject: Added generate-motd.sh X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=f53b03f9f0ac1bc90fd93c93b01a0a338554aff5;p=scripts%2Froot-bin.git Added generate-motd.sh --- diff --git a/generate-motd.sh b/generate-motd.sh new file mode 100755 index 0000000..99b37d1 --- /dev/null +++ b/generate-motd.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +MOTD=/etc/motd.1 + +echo "Generating '${MOTD}' ..." +export LC_ALL=de_DE.utf8 + +uname -a >"${MOTD}" +if [ -f /etc/gentoo-release ] ; then + cat /etc/gentoo-release >>"${MOTD}" +fi +if [ -f /etc/motd.tail ] ; then + cat /etc/motd.tail >>"${MOTD}" +fi + +if [ -x /usr/bin/fortune ] ; then + echo >>"${MOTD}" + /usr/bin/fortune de >>"${MOTD}" +fi + +if [ -x /usr/bin/ddate ] ; then + echo >>"${MOTD}" + /usr/bin/ddate >>"${MOTD}" +fi + +echo >>"${MOTD}" + +# vim: ts=4 expandtab