/[pdpsoft]/nl.nikhef.pdp.fetchcrl/trunk/fetch-crl3.pl
ViewVC logotype

Diff of /nl.nikhef.pdp.fetchcrl/trunk/fetch-crl3.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1878 by davidg, Tue Aug 10 07:03:43 2010 UTC revision 2084 by davidg, Thu Nov 11 11:03:19 2010 UTC
# Line 113  sub init_configuration() { Line 113  sub init_configuration() {
113    my $parallelism=0;    my $parallelism=0;
114    my $randomwait;    my $randomwait;
115    my $nosymlinks;    my $nosymlinks;
116      my $cfgdir;
117    
118    $log = FCLog->new("qualified");    $log = FCLog->new("qualified");
119    
# Line 121  sub init_configuration() { Line 122  sub init_configuration() {
122      "l|infodir=s" => \$infodir,      "l|infodir=s" => \$infodir,
123      "cadir=s" => \$cadir,      "cadir=s" => \$cadir,
124      "s|statedir=s" => \$statedir,      "s|statedir=s" => \$statedir,
125        "cfgdir=s" => \$cfgdir,
126      "T|httptimeout=i" => \$httptimeout,      "T|httptimeout=i" => \$httptimeout,
127      "o|output=s" => \$output,      "o|output=s" => \$output,
128      "format=s@" => \@formats,      "format=s@" => \@formats,
# Line 145  sub init_configuration() { Line 147  sub init_configuration() {
147      $cnf->read($configfile) || die "Invalid config file $configfile:\n  " .      $cnf->read($configfile) || die "Invalid config file $configfile:\n  " .
148                                     $cnf->errstr . "\n";                                     $cnf->errstr . "\n";
149    
150      ( defined $cnf->{_}->{cfgdir} and $cfgdir = $cnf->{_}->{cfgdir} )
151        unless defined $cfgdir;
152      $cfgdir ||= "/etc/fetch-crl.d";
153      if ( defined $cfgdir and -d $cfgdir and opendir(my $dh,$cfgdir) ) {
154        while ( my $fn = readdir $dh ) {
155          -f "$cfgdir/$fn" and -r "$cfgdir/$fn" and $cnf->read("$cfgdir/$fn");
156        }
157        close $dh;
158      }
159    
160    # command-line option overrides    # command-line option overrides
161    $cnf->{_}->{agingtolerance} = $agingtolerance if defined $agingtolerance;    $cnf->{_}->{agingtolerance} = $agingtolerance if defined $agingtolerance;
162    $cnf->{_}->{infodir}        = $infodir if defined $infodir;    $cnf->{_}->{infodir}        = $infodir if defined $infodir;

Legend:
Removed from v.1878  
changed lines
  Added in v.2084

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28