[Logwatch-Devel] patch for logwatch.pl to set $BaseDir (and $PerlVersion)

Mike Tremaine mgt at stellarcore.net
Mon Sep 26 10:55:19 MST 2005


On Fri, 2005-09-16 at 00:35, David Baldwin wrote:

> Could also consider setting:
>   my $PerlVersion = $^X;
> 

Points for cleverness davidb++

This was commited to CVS.



> --- scripts/logwatch.pl 14 Jun 2005 05:36:58 -0000      1.131
> +++ scripts/logwatch.pl 16 Sep 2005 07:25:40 -0000
> @@ -20,10 +20,12 @@
>   #
>   ########################################################
> 
> +use FindBin qw($RealBin);
>   #To be FHS compliant distro packages might use this
>   #my $BaseDir = "/usr/share/logwatch";
>   #my $ConfigDir = "/etc/log.d/conf";
> -my $BaseDir = "/etc/log.d";
> +#my $BaseDir = "/etc/log.d";
> +my $BaseDir = "$RealBin/..";
>   my $ConfigDir = "$BaseDir/conf";
>   my $PerlVersion = "/usr/bin/perl";

Anyone have an opinion about using FindBin to auto-detect the BaseDir?
It's pretty much a developers thing, but its pretty clever.


-- 
Mike Tremaine
mgt at stellarcore.net
http://www.stellarcore.net



More information about the Logwatch-Devel mailing list