Comment 3 for bug 376709

Revision history for this message
Kenyon Ralph (kralph) wrote :

Here is /etc/cron.d/mrtg from intrepid:

*/5 * * * * root if [ -d /var/lock/mrtg ]; then if [ -x /usr/bin/mrtg ] && [ -r /etc/mrtg.cfg ]; then env LANG=C /usr/bin/mrtg /etc/mrtg.cfg >> /var/log/mrtg/mrtg.log 2>&1; fi else mkdir /var/lock/mrtg; fi

And from jaunty:

*/5 * * * * root if [ ! -d /var/lock/mrtg ]; then mkdir /var/lock/mrtg; fi; if [ -x /usr/bin/mrtg ] && [ -r /etc/mrtg.cfg ]; then env LANG=C /usr/bin/mrtg /etc/mrtg.cfg 2>&1 | tee -a /var/log/mrtg/mrtg.log ; fi

It looks like these are both intended to have the same effects, so I don't know why it was changed, but the jaunty one causes output, which cron emails. The emails look like this:

Date: Wed, 25 Mar 2009 20:10:05 -0700
From: Cron Daemon
To: root
Subject: Cron <root@localhost> if [ ! -d /var/lock/mrtg ]; then mkdir /var/lock/mrtg;
     fi; if [ -x /usr/bin/mrtg ] && [ -r /etc/mrtg.cfg ]; then env LANG=C
    /usr/bin/mrtg /etc/mrtg.cfg 2>&1 | tee -a /var/log/mrtg/mrtg.log ; fi

ERROR: CFG Error in "workdir", line 8: Working directory /var/www/mrtg does not exist

On intrepid, these error messages would instead go only to /var/log/mrtg/mrtg.log.