Comment 8 for bug 30428

Revision history for this message
Victor Hugo dos Santos (victorhugops) wrote : Re: [Bug 30428] Re: [Bug 30428] Re: /var/lock/mrtg disappears on reboot

2006/8/24, Kevin Otte <email address hidden>:
> On Thu, Aug 24, 2006 at 08:33:41PM -0000, Victor Hugo dos Santos wrote:
> > */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
>
> The problem with this is that no data is logged during this run. You will
> have a 10 minute gap in all your graphs.

ooppss.. is true !!! :(

mmm.. the command line correct/arranged is:

*/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 >> /var/log/mrtg/mrtg.log
2>&1; fi

where not is necesary wait 10 minutes for run mrtg !!! :D

it's ok ??

> It is probably better to simply do the mkdir in /etc/rc.local until the
> package itself is corrected.

mmm.. yes.. is one option, but i (IMHO) dont belive that is better.

tks.

--
--
Victor Hugo dos Santos
Linux Counter #224399