From f53b03f9f0ac1bc90fd93c93b01a0a338554aff5 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Fri, 28 Oct 2011 10:01:55 +0200 Subject: [PATCH] Added generate-motd.sh --- generate-motd.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 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 -- 2.39.5