From: Frank Brehm Date: Thu, 25 Feb 2016 11:45:12 +0000 (+0100) Subject: Changed generate-motd.sh X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=503a8ae75616554ebf79fef9f1618b58d2ac6278;p=scripts%2Froot-bin.git Changed generate-motd.sh --- 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