From a3965a6ef4cabbb3089f2ba92e09cb15c6f5018d Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Sat, 12 Jan 2019 19:14:35 +1300 Subject: [PATCH] Recent releases of Debian & Ubuntu use update-motd.d, drop old support --- bin/mythtv-update-motd | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/mythtv-update-motd b/bin/mythtv-update-motd index a8c1c5d..46542da 100755 --- a/bin/mythtv-update-motd +++ b/bin/mythtv-update-motd @@ -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 -- 2.30.2