From: Jeffrey J. K. <bac...@ko...> - 2009-09-03 21:10:48
|
Carl Wilhelm Soderstrom wrote at about 15:00:37 -0500 on Thursday, September 3, 2009: > On 09/03 08:45 , Davide Brini wrote: > > I agree that it should work like that. However, if I'm not mistaken, it seems > > that what's written here still applies: > > > > http://osdir.com/ml/sysutils.backup.backuppc.general/2003-10/msg00010.html > > I think the current behavior is the correct behavior -- where the per-host > config file variable data completely replaces the defaults set in the > config.pl. > > The reason is that there are some settings in config.pl where is it not > sensible to add the value in config.pl to the value in the per-host file; > such as the rsync command. > > It would be bad from a discoverability standpoint to have some variables be > additive, and others ablative. They should all behave the same way; and the > only sensible way IMHO is current behavior. > > Please correct me if I misunderstand your statement and intent. Perhaps I misunderstand by why couldn't the config.pl be read in and evaluated first followed by reading in the appropriate pc/hostname.pl file if it exist. Then: 1. Any statement in subsequent pc/hostname.pl files of form $Conf{xxxxx} = "yyyy"; would clearly overwrite earlier settings. 2. Any missing $Conf variable in the pc/hostname.pl file would inherit from the config.pl file. 3. And something of form: push(@{$Conf{xxxxx}}, "zzzz"); would append to the value set in the main config.pl file The only issue is that for some variables form #3 might not make sense but then don't use form #3 or use another snippet of Perl code to properly make your edit. |