From: Andrew Ruthven Date: Fri, 17 Sep 2010 12:45:04 +0000 (+1200) Subject: mythtv-status has a couple of return statuses that can mean things are okay, handle... X-Git-Tag: 0.9.5~2 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2497cd1573af6c66a7adda01519c33b5e5dd9d5c;p=mythtv-status.git mythtv-status has a couple of return statuses that can mean things are okay, handle that. --- diff --git a/bin/mythtv-update-motd b/bin/mythtv-update-motd index e38c62e..b7e080b 100755 --- a/bin/mythtv-update-motd +++ b/bin/mythtv-update-motd @@ -10,7 +10,8 @@ fi [ ! -f /var/run/motd.orig ] && cp /var/run/motd /var/run/motd.orig cp /var/run/motd.orig /var/run/motd.new -if mythtv-status $ARGS -h $HOST >> /var/run/motd.new -then +ret=0 +mythtv-status $ARGS -h $HOST >> /var/run/motd.new 2> /dev/null || ret=$? +if [ $ret -eq 0 -o $ret -eq 1 ]; then [ -f /var/run/motd.new ] && mv /var/run/motd.new /var/run/motd fi