[Logwatch-Devel] Proposed change for cat directory bug

Kirk Bauer kirk at kaybee.org
Thu Aug 31 15:13:52 MST 2006


Looks OK... could do a "-f" or a "-l" and maybe even then do a "-f" on
where the symlink points to?

On 8/31/06, Mike Tremaine <mgt at stellarcore.net> wrote:
>
>
> We saw a rare bug where the Archive glob picked up the directories
> cron.daily cron.weekly etc....
>
> I think the fix for this is a simple change from -e to -f in the test.
>
>
> [mgt at dwarfstar scripts]$ cvs diff logwatch.pl
> Index: logwatch.pl
> ===================================================================
> RCS file: /var/cvs/logwatch/scripts/logwatch.pl,v
> retrieving revision 1.176
> diff -r1.176 logwatch.pl
> 873c873
> <          if (($Archive =~ m/gz$/) && (-e "$Archive")) {
> ---
> >          if (($Archive =~ m/gz$/) && (-f "$Archive")) {
> 880c880
> <          } elsif (($Archive =~ m/bz2$/) && (-e "$Archive")) {
> ---
> >          } elsif (($Archive =~ m/bz2$/) && (-f "$Archive")) {
> 887c887
> <          } elsif (-e "$Archive") {
> ---
> >          } elsif (-f "$Archive") {
>
>
> Anyone see anything wrong with that?
>
> It will probably fail on symlinks is that a big deal?
>
> -Mike
>
> _______________________________________________
> Logwatch-Devel mailing list
> Logwatch-Devel at logwatch.org
> http://www2.list.logwatch.org:8080/lists/listinfo/logwatch-devel
>
>


-- 
Kirk Bauer <kirk at kaybee.org>
http://linux.kaybee.org | www.autorpm.org | www.logwatch.org


More information about the Logwatch-Devel mailing list