From: Andrew Ruthven Date: Thu, 21 May 2009 20:51:45 +0000 (+1200) Subject: Only move /var/run/motd.new if it exists. X-Git-Tag: 0.9.2~1 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af8f37edd91f486cce64f7c2c1d29584c231bcd7;p=mythtv-status.git Only move /var/run/motd.new if it exists. We must be hitting a race condition when update-motd is installed, since we've only just written to /var/run/motd.new when we try and write to it. From Launchpad: Cron script spams due to not suppressing error when there is no /var/run/motd.new https://bugs.launchpad.net/bugs/379044 --- diff --git a/bin/mythtv-update-motd b/bin/mythtv-update-motd index d58aa41..e38c62e 100755 --- a/bin/mythtv-update-motd +++ b/bin/mythtv-update-motd @@ -12,5 +12,5 @@ fi cp /var/run/motd.orig /var/run/motd.new if mythtv-status $ARGS -h $HOST >> /var/run/motd.new then - mv /var/run/motd.new /var/run/motd + [ -f /var/run/motd.new ] && mv /var/run/motd.new /var/run/motd fi