# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2004-2007 Craig Barratt
+# Copyright (C) 2004-2009 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 3.2.0, released 31 Dec 2008.
+# Version 3.2.0, released 31 Jul 2010.
#
# See http://backuppc.sourceforge.net.
#
sub ConfigDataRead
{
- my($s, $host) = @_;
+ my($s, $host, $prevConfig) = @_;
my($ret, $mesg, $config, @configs);
#
# TODO: add lock
#
- my $conf = {};
+ my $conf = $prevConfig || {};
my $configPath = $s->ConfigPath($host);
push(@configs, $configPath) if ( -f $configPath );
foreach $config ( @configs ) {
- %Conf = ();
+ %Conf = %$conf;
if ( !defined($ret = do $config) && ($! || $@) ) {
$mesg = "Couldn't open $config: $!" if ( $! );
$mesg = "Couldn't execute $config: $@" if ( $@ );
$mesg =~ s/[\n\r]+//;
return ($mesg, $conf);
}
- %$conf = ( %$conf, %Conf );
+ %$conf = %Conf;
}
#