Recent releases of Debian & Ubuntu use update-motd.d, drop old support
authorAndrew Ruthven <andrew@etc.gen.nz>
Sat, 12 Jan 2019 06:14:35 +0000 (19:14 +1300)
committerAndrew Ruthven <andrew@etc.gen.nz>
Sat, 12 Jan 2019 06:14:35 +0000 (19:14 +1300)
bin/mythtv-update-motd

index a8c1c5d..46542da 100755 (executable)
@@ -30,6 +30,9 @@ if [ -d /etc/update-motd.d ]
 then
   # We want to generate file which only contains the MythTV Status
   # as a snippet in /etc/update-motd.d will cat this file.
+  #
+  # Current (as of 2019-01-1) Debian and Ubuntu releases use this
+  # method.
 
   WORKFILE=/run/motd.mythtv-status
   TEMPFILE=${WORKFILE}.new
@@ -46,11 +49,7 @@ else
     DISTRO='unknown'
   fi
 
-  if [ $DISTRO = 'debian' ]
-  then
-    # Debian Wheezy+ handles the MOTD differently.
-    [ -f /run/motd.dynamic ] && WORKFILE=/run/motd.dynamic
-  elif [ $DISTRO = 'fedora' ]
+  if [ $DISTRO = 'fedora' ]
   then
     WORKFILE=/etc/motd
     STUBFILE=/etc/motd.stub