From 23664393caac9d7cbcfcc7b6ed5fa46f3ed06d16 Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Sat, 12 Jan 2019 00:48:37 +1300 Subject: [PATCH] Ensure we still work if RUN and ARGS are used instead of the new variables --- bin/mythtv-update-motd | 5 +++++ debian/init.d | 3 +++ 2 files changed, 8 insertions(+) diff --git a/bin/mythtv-update-motd b/bin/mythtv-update-motd index 59a54f5..027e6bb 100755 --- a/bin/mythtv-update-motd +++ b/bin/mythtv-update-motd @@ -15,6 +15,9 @@ NAME=mythtv-update-motd # Fedora style [ -r /etc/sysconfig/mythtv-status ] && . /etc/sysconfig/mythtv-status +# Support the old RUN variable +[ x$UPDATE_MOTD = x ] && UPDATE_MOTD=$RUN + if [ x$UPDATE_MOTD != xyes -o -f /var/lib/mythtv-status/motd_update_disabled ] then exit @@ -74,6 +77,8 @@ else cp $STUBFILE $TEMPFILE fi +# Support the old ARGS variable +[ x$UPDATE_MOTD_ARGS = x ] && UPDATE_MOTD_ARGS=$ARGS ret=0 mythtv-status $UPDATE_MOTD_ARGS -h $HOST >> $TEMPFILE || ret=$? diff --git a/debian/init.d b/debian/init.d index aee2760..cbaa57f 100644 --- a/debian/init.d +++ b/debian/init.d @@ -48,6 +48,9 @@ if [ -f /etc/default/$NAME ] ; then . /etc/default/$NAME fi +# Support the old RUN variable +[ x$UPDATE_MOTD = x ] && UPDATE_MOTD=$RUN + # Use this if you want the user to explicitly set 'UPDATE_MOTD' in # /etc/default/mythtv-status if [ "x$UPDATE_MOTD" != "xyes" ] ; then -- 2.30.2