]> Frank Brehm's Git Trees - scripts/root-bin.git/commitdiff
Changed generate-motd.sh
authorFrank Brehm <frank@brehm-online.com>
Thu, 25 Feb 2016 11:45:12 +0000 (12:45 +0100)
committerFrank Brehm <frank@brehm-online.com>
Thu, 25 Feb 2016 11:45:12 +0000 (12:45 +0100)
generate-motd.sh

index c449c0d1ff5df1bd250786fb7dbd3dd4814d0dd3..6e7579283eb3dce3dc7f51e9886f3d91f3c31ec7 100755 (executable)
@@ -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