Tomorrow, John Rouillard wrote:
> On Sun, Nov 04, 2007 at 06:41:24PM -0800, Craig Barratt wrote:
>> Paul writes:
>>> So you should be able to do something like this:
>>>
>>> $Conf{RsyncArgs} = [ @$Conf{RsyncArgs}, '--copy-links' ];
>>> Since you're dealing with Perl, you could probably
>>> create a file with a list of slow hosts, read that
>>> into a hash (say, %slow_hosts, since I don't like
>>> CamelCase)), and then you can say:
>>>
>>> $Conf{RsyncArgs} = [ @$RConf{RsyncArgs}, '--bwlimit=128' ] if defined
>>> $slow_hosts{$host};
>>
>> Unfortunately this won't work for two reasons: when the config files
>> are parsed, the %Conf hash is empty (it is merged after each file is
>> parsed).
>
> Yup. For those looking for the details see my prior email.
>
I was thinking: at the bottom of the main config.pl:
%mainConf = %Conf;
That should set a global variable that, as long as the main config.pl is
sourced (eval'ed, actually, yes?) before the per-machine config.pl, should
be available for use in the per-machine config. So the above line would
become:
$Conf{RsyncArgs} = [ @$mainConf{RsyncArgs}, '--bwlimit=128' ] if defined
$slow_hosts{$host};
Paul
-------------------------------------------------------------------------
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-users mailing list
[email protected]
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/