# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2005 Craig Barratt
+# Copyright (C) 2005-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.1.0beta0, released 3 Sep 2007.
+# Version 3.2.0, released 31 Jul 2010.
#
# See http://backuppc.sourceforge.net.
#
{name => "UmaskMode"},
{name => "MyPath"},
{name => "DHCPAddressRanges"},
+ {name => "CmdQueueNice"},
{name => "PerlModuleLoad"},
{name => "ServerInitdPath"},
{name => "ServerInitdStartCmd"},
{name => "ClientCharset"},
{name => "ClientCharsetLegacy"},
+ ### Smb Settings
{text => "CfgEdit_Title_Smb_Settings",
visible => sub { return $_[0]->{XferMethod} eq "smb"; } },
{name => "SmbShareName",
{name => "SmbSharePasswd",
visible => sub { return $_[0]->{XferMethod} eq "smb"; } },
+ ### Tar Settings
{text => "CfgEdit_Title_Tar_Settings",
visible => sub { return $_[0]->{XferMethod} eq "tar"; } },
{name => "TarShareName",
visible => sub { return $_[0]->{XferMethod} eq "tar"; } },
+ ### Rsync Settings
{text => "CfgEdit_Title_Rsync_Settings",
visible => sub { return $_[0]->{XferMethod} eq "rsync"; } },
{text => "CfgEdit_Title_Rsyncd_Settings",
{name => "RsyncCsumCacheVerifyProb",
visible => sub { return $_[0]->{XferMethod} =~ /rsync/; } },
- {text => "CfgEdit_Title_BackupPCd_Settings",
- visible => sub { return $_[0]->{XferMethod} eq "backuppcd"; } },
- {name => "BackupPCdShareName",
- visible => sub { return $_[0]->{XferMethod} eq "backuppcd"; } },
- {name => "BackupPCdPath",
- visible => sub { return $_[0]->{XferMethod} eq "backuppcd"; } },
- {name => "BackupPCdCmd",
- visible => sub { return $_[0]->{XferMethod} eq "backuppcd"; } },
- {name => "BackupPCdRestoreCmd",
- visible => sub { return $_[0]->{XferMethod} eq "backuppcd"; } },
-
+ ### Ftp Settings
+ {text => "CfgEdit_Title_Ftp_Settings",
+ visible => sub { return $_[0]->{XferMethod} eq "ftp"; } },
+ {name => "FtpShareName",
+ visible => sub { return $_[0]->{XferMethod} eq "ftp"; } },
+ {name => "FtpUserName",
+ visible => sub { return $_[0]->{XferMethod} eq "ftp"; } },
+ {name => "FtpPasswd",
+ visible => sub { return $_[0]->{XferMethod} eq "ftp"; } },
+ {name => "FtpPassive",
+ visible => sub { return $_[0]->{XferMethod} eq "ftp"; } },
+ {name => "FtpBlockSize",
+ visible => sub { return $_[0]->{XferMethod} eq "ftp"; } },
+ {name => "FtpPort",
+ visible => sub { return $_[0]->{XferMethod} eq "ftp"; } },
+ {name => "FtpTimeout",
+ visible => sub { return $_[0]->{XferMethod} eq "ftp"; } },
+ {name => "FtpFollowSymlinks",
+ visible => sub { return $_[0]->{XferMethod} eq "ftp"; } },
+
+
+ ### Archive Settings
{text => "CfgEdit_Title_Archive_Settings",
visible => sub { return $_[0]->{XferMethod} eq "archive"; } },
{name => "ArchiveDest",
{name => "ArchiveSplit",
visible => sub { return $_[0]->{XferMethod} eq "archive"; } },
+ ### Include/Exclude Settings
{text => "CfgEdit_Title_Include_Exclude",
visible => sub { return $_[0]->{XferMethod} ne "archive"; } },
{name => "BackupFilesOnly",
{name => "BackupFilesExclude",
visible => sub { return $_[0]->{XferMethod} ne "archive"; } },
+ ### Samba paths and commands
{text => "CfgEdit_Title_Smb_Paths_Commands",
visible => sub { return $_[0]->{XferMethod} eq "smb"; } },
{name => "SmbClientPath",
{name => "SmbClientRestoreCmd",
visible => sub { return $_[0]->{XferMethod} eq "smb"; } },
+ ### Tar paths and commands
{text => "CfgEdit_Title_Tar_Paths_Commands",
visible => sub { return $_[0]->{XferMethod} eq "tar"; } },
{name => "TarClientPath",
{name => "TarClientRestoreCmd",
visible => sub { return $_[0]->{XferMethod} eq "tar"; } },
+ ### Rsync paths and commands
{text => "CfgEdit_Title_Rsync_Paths_Commands_Args",
visible => sub { return $_[0]->{XferMethod} eq "rsync"; } },
{text => "CfgEdit_Title_Rsyncd_Port_Args",
visible => sub { return $_[0]->{XferMethod} eq "rsyncd"; } },
{name => "RsyncArgs",
visible => sub { return $_[0]->{XferMethod} =~ /rsync/; } },
+ {name => "RsyncArgsExtra",
+ visible => sub { return $_[0]->{XferMethod} =~ /rsync/; } },
{name => "RsyncRestoreArgs",
visible => sub { return $_[0]->{XferMethod} =~ /rsync/; } },
+ ### Archive paths and commands
{text => "CfgEdit_Title_Archive_Paths_Commands",
visible => sub { return $_[0]->{XferMethod} eq "archive"; } },
{name => "ArchiveClientCmd",
}
if ( (my $var = $In{overrideUncheck}) ne "" ) {
#
- # a compound variable was unchecked; delete extra
- # variables to make the shape the same.
+ # a compound variable was unchecked; delete or
+ # add extra variables to make the shape the same.
#
#print STDERR Dumper(\%In);
foreach my $v ( keys(%In) ) {
- next if ( $v !~ /^v_zZ_(\Q$var\E(_zZ_.*|$))/ );
- delete($In{$v}) if ( !defined($In{"orig_zZ_$1"}) );
+ if ( $v =~ /^v_zZ_(\Q$var\E(_zZ_.*|$))/ ) {
+ delete($In{$v}) if ( !defined($In{"orig_zZ_$1"}) );
+ }
+ if ( $v =~ /^orig_zZ_(\Q$var\E(_zZ_.*|$))/ ) {
+ $In{"v_zZ_$1"} = $In{$v};
+ }
}
delete($In{"vflds.$var"});
}
($mesg, my $hostChange) = hostsDiffMesg($hostsNew);
$bpc->HostInfoWrite($hostsNew) if ( $hostChange );
foreach my $host ( keys(%$copyConf) ) {
- my $confData = $bpc->ConfigDataRead($copyConf->{$host});
+ #
+ # Currently host names are forced to lc when they
+ # are read from the hosts file. Therefore we need
+ # to force the from and to hosts to lc.
+ #
+ my $confData = $bpc->ConfigDataRead(lc($copyConf->{$host}));
my $fromHost = $copyConf->{$host};
- $err .= $bpc->ConfigDataWrite($host, $confData);
+ $err .= $bpc->ConfigDataWrite(lc($host), $confData);
$mesg .= eval("qq($Lang->{CfgEdit_Log_Copy_host_config})");
}
if ( $level == 0 ) {
my $lcVarName = lc($varName);
$content .= <<EOF;
-<tr><td class="border"><a href="?action=view&type=docs#item__conf_${lcVarName}_">$varName</a>
+<tr><td class="border"><a href="?action=view&type=docs#_conf_${lcVarName}_">$varName</a>
EOF
if ( defined($overrideVar) ) {
my $override_checked = "";
my $value = $dump->Dump;
$value =~ s/\n/\\n/g;
$value =~ s/\r/\\r/g;
+ if ( $p =~ /Passwd/ || $p =~ /Secret/ ) {
+ $value = "'*'";
+ }
+
$mesg .= eval("qq($Lang->{CfgEdit_Log_Add_param_value})");
} else {
my $dump = Data::Dumper->new([$newConf->{$p}]);
$valueOld =~ s/\n/\\n/g;
$valueNew =~ s/\r/\\r/g;
$valueOld =~ s/\r/\\r/g;
+ if ( $p =~ /Passwd/ || $p =~ /Secret/ ) {
+ $valueNew = "'*'";
+ $valueOld = "'*'";
+ }
$mesg .= eval("qq($Lang->{CfgEdit_Log_Change_param_value})");
}