From af8f37edd91f486cce64f7c2c1d29584c231bcd7 Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Fri, 22 May 2009 08:51:45 +1200 Subject: [PATCH] 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 --- bin/mythtv-update-motd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2