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.

> Second, using perl code won't work with the CGI config
> editor.

Well it does sort of. The perl code is preserved on
saving and the expanded value does show up in the
editor. However when it is saved, the newly defined
$Conf variables are placed after the perl code in the
file thus overriding the perl code.

In my case it doesn't matter because we won't be using
the web editing interface. All the changes to the
backup system are pushed by our config management
system, so any changes done via the web interface will
be overwritten.

-- 
                                -- rouilj

John Rouillard
System Administrator
Renesys Corporation
603-643-9300 x 111

-------------------------------------------------------------------------
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/

Reply via email to