On Monday 15 October 2007, R. David wrote:
> Not putting the default values in the config files leads in delta being
> set to -1 => it seems even if the comments states that 1..23 is the
> default, one needs to define Wakesupshedule in the config.pl file !

No. That is why the code has:
   foreach my $t ( @{$Conf{WakeupSchedule} || [0..23]} )

The "|| [0..23]" in that line should make sure that a default of 0 1 .. 23
is used if @{$Conf{WakeupSchedule} is not defined!

In the test program that works for me. Try:
   #my $confvalue = [10..20];
   print "test: @{$confvalue || [5..10]}\n";
   foreach my $t ( @{$confvalue || [0..23]} ) {

You'll see that runs fine too. If you then uncomment the first of those lines,
you should see it using 10 11 ..20 instead of 0 1 .. 23.

My conclusion would be that $Conf{WakeupSchedule} somehow _is_ defined, but
empty. That's why I wanted that debug statement in the real perl script.
If you don't trust it as I suggested in my previous mail, add this instead:
   print (LOG $bpc->timeStamp,"DEBUG LOG ","@{$Conf{WakeupSchedule} || 
[5..10]}","DEBUG LOG");
That should avoid any runtime errors and should tell us what the
content of $Conf{WakeupSchedule} actually is.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
BackupPC-devel mailing list
BackupPC-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-devel
http://backuppc.sourceforge.net/

Reply via email to