]> git.etc.gen.nz Git - mythtv-status.git/commitdiff
mythtv-status has a couple of return statuses that can mean things are okay, handle...
authorAndrew Ruthven <andrew@etc.gen.nz>
Fri, 17 Sep 2010 12:45:04 +0000 (00:45 +1200)
committerAndrew Ruthven <andrew@etc.gen.nz>
Fri, 17 Sep 2010 12:45:04 +0000 (00:45 +1200)
bin/mythtv-update-motd

index e38c62e3cf28f097ba744b411563c4da3f79b920..b7e080b7f683707b8d058d5e86b39c0d9d09c000 100755 (executable)
@@ -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