[Logwatch] Logwatch-CVS & Cron

Mike Tremaine mgt at stellarcore.net
Thu Aug 31 14:00:55 MST 2006


On Thu, 2006-08-31 at 11:44 -0700, Ann Hopkins wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I just figured out why my installation was different, and why I had
> the problems, and I can make the error occur on the command line as
> well.
> 
> What you said about the relative path made sense. It should have saw
> a directory called "cron.d" and "crontab" as well if it was looking
> at the path "/usr/local/etc", but it didn't which gave me the
> location of the problem.
> 
> I had copied the directories "cron.weekly .... cron.daily" to the
> "/root" home directory, because I needed to make changes to the
> scripts in those directories, but I wanted to make and test them
> off-line - as well as backup.
> 
> "cron"'s relative directory for root has to be the home directory.
> As soon, as I moved those directories to a temporary directory
> within "/root" it did not see these false Archives and ran fine.
> 
> Invoking "logwatch" from "/root" with those directories "cron.weekly
> .... cron.daily" visible caused the same problem it did when running
> it within "cron".
> 
> I assume this problem would occur if you just happen to have a
> directory with the same name in "/root" as any archive, but it is my
> problem and I thank you for pointing me toward the why.
> 
> I just had a very weird circumstance.  If I rename the directories
> there is not going to be a problem.
> 
> Thank you.
> 
> Mike Tremaine wrote:
> > On Wed, 2006-08-30 at 20:53 -0700, Ann Hopkins wrote:
> > 
> > Interesting, I'll have to play with it tomorrow but it might finding
> > those directories assuming they are files
> > 
> > Line 602 
> > 
> > foreach my $dir ("$Config{'logdir'}/", "/var/adm/", "/var/log/", "")
> > 
> > Notice the "" makes the search it relative to where it is invoked. Then
> > the cron.conf logfile has
> > 
> > Archive = cron.*
> > Archive = archiv/cron.*
> > 
> > Which is make something like cron.daily match
> > 
> > odd... If you'd like a kludge remove the Archive matches in cron.conf 
> > 
> > -Mike


I consider this a bug so I'll look at changing the existence check to a
file check so that this doesn't happen to someone else.

Thanks for be sticking with it.

-Mike



More information about the Logwatch mailing list