]> Frank Brehm's Git Trees - scripts/root-bin.git/commitdiff
Update for Debian Stretch
authorFrank Brehm <frank@brehm-online.com>
Thu, 27 Oct 2016 09:42:47 +0000 (11:42 +0200)
committerFrank Brehm <frank@brehm-online.com>
Thu, 27 Oct 2016 09:42:47 +0000 (11:42 +0200)
generate-motd.sh

index 6e7579283eb3dce3dc7f51e9886f3d91f3c31ec7..a3788051451f3466e44eded864b08716baab35f6 100755 (executable)
@@ -9,6 +9,11 @@ cp /dev/null "${MOTD}"
 DISTRI_ID=$( lsb_release -i -s | tr '[:upper:]' '[:lower:]' )
 if [[ "${DISTRI_ID}" != 'debian' ]] ; then
     uname -a >>"${MOTD}"
+else
+    CODENAME=$( lsb_release -c -s | tr '[:upper:]' '[:lower:]' )
+    if [[ "${CODENAME}" == "stretch" ]] ; then
+        uname -a >>"${MOTD}"
+    fi
 fi
 if [[ -f /etc/gentoo-release ]] ; then
     cat /etc/gentoo-release >>"${MOTD}"