From 503a8ae75616554ebf79fef9f1618b58d2ac6278 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Thu, 25 Feb 2016 12:45:12 +0100 Subject: [PATCH] Changed generate-motd.sh --- generate-motd.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/generate-motd.sh b/generate-motd.sh index c449c0d..6e75792 100755 --- a/generate-motd.sh +++ b/generate-motd.sh @@ -5,7 +5,11 @@ MOTD=/etc/motd echo "Generating '${MOTD}' ..." export LC_ALL=de_DE.utf8 -uname -a >"${MOTD}" +cp /dev/null "${MOTD}" +DISTRI_ID=$( lsb_release -i -s | tr '[:upper:]' '[:lower:]' ) +if [[ "${DISTRI_ID}" != 'debian' ]] ; then + uname -a >>"${MOTD}" +fi if [[ -f /etc/gentoo-release ]] ; then cat /etc/gentoo-release >>"${MOTD}" elif [[ -x /usr/bin/lsb_release ]] ; then -- 2.39.5