From: cbarratt Date: Sun, 5 Feb 2006 18:46:43 +0000 (+0000) Subject: - various fixes to configure.pl and lib/BackupPC/Lib.pm X-Git-Tag: v3_0_0beta0~11 X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=commitdiff_plain;h=27f513f89d885d24bf1a01242fba676c7a840fd5 - various fixes to configure.pl and lib/BackupPC/Lib.pm - updated language strings so makeDist is error free - fix to lib/BackupPC/Xfer/RsyncFileIO.pm for File::RsyncP 0.52. - passwords in editor now use password text type - various other bug fixes from 2.1.2pl1. --- diff --git a/bin/BackupPC_attribPrint b/bin/BackupPC_attribPrint index c583654..9e02e5c 100755 --- a/bin/BackupPC_attribPrint +++ b/bin/BackupPC_attribPrint @@ -31,7 +31,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 3.0.0alpha, released 23 Jan 2006. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_fixupBackupSummary b/bin/BackupPC_fixupBackupSummary index 5bc5318..537bbc1 100755 --- a/bin/BackupPC_fixupBackupSummary +++ b/bin/BackupPC_fixupBackupSummary @@ -30,7 +30,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 3.0.0alpha, released 23 Jan 2006. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_tarPCCopy b/bin/BackupPC_tarPCCopy index a7b0e7a..f2d96b1 100755 --- a/bin/BackupPC_tarPCCopy +++ b/bin/BackupPC_tarPCCopy @@ -36,7 +36,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 3.0.0alpha, released 23 Jan 2006. # # See http://backuppc.sourceforge.net. # diff --git a/conf/config.pl b/conf/config.pl index d0fdc1f..e02fe27 100644 --- a/conf/config.pl +++ b/conf/config.pl @@ -270,14 +270,27 @@ $Conf{TrashCleanSleepSec} = 300; $Conf{DHCPAddressRanges} = []; # -# These configuration settings aren't used by BackupPC, but simply -# remember a few settings used by configure.pl during installation. -# These are used by configure.pl when upgrading to new versions of -# BackupPC. +# The BackupPC user. # $Conf{BackupPCUser} = ''; -$Conf{CgiDir} = ''; -$Conf{InstallDir} = ''; + +# +# Important installation directories: +# +# TopDir - where all the backup data is stored +# ConfDir - where the main config and hosts files resides +# LogDir - where log files and other transient information +# InstallDir - where the bin, lib and doc installation dirs reside. +# Note: you cannot change this value since all the +# perl scripts include this path. You must reinstall +# with configure.pl to change InstallDir. +# CgiDir - Apache CGI directory for BackupPC_Admin +# +$Conf{TopDir} = ''; +$Conf{ConfDir} = ''; +$Conf{LogDir} = ''; +$Conf{InstallDir} = ''; +$Conf{CgiDir} = ''; # # Whether BackupPC and the CGI script BackupPC_Admin verify that they @@ -1848,7 +1861,14 @@ $Conf{CgiUserConfigEditEnable} = 1; # # Which per-host config variables a non-admin user is allowed -# to edit. +# to edit. Admin users can edit all per-host config variables, +# even if disabled in this list. +# +# SECURITY WARNING: Do not let users edit any of the Cmd +# config variables! That's because a user could set a +# Cmd to a shell script of their choice and it will be +# run as the BackupPC user. That script could do all +# sorts of bad things. # $Conf{CgiUserConfigEdit} = { FullPeriod => 1, @@ -1869,14 +1889,20 @@ $Conf{CgiUserConfigEdit} = { BlackoutGoodCnt => 1, BlackoutPeriods => 1, BackupZeroFilesIsFatal => 1, + ClientCharset => 1, XferMethod => 1, XferLogLevel => 1, SmbShareName => 1, SmbShareUserName => 1, SmbSharePasswd => 1, + SmbClientFullCmd => 0, + SmbClientIncrCmd => 0, + SmbClientRestoreCmd => 0, TarShareName => 1, TarFullArgs => 1, TarIncrArgs => 1, + TarClientCmd => 0, + TarClientRestoreCmd => 0, RsyncShareName => 1, RsyncdClientPort => 1, RsyncdPasswd => 1, @@ -1884,16 +1910,30 @@ $Conf{CgiUserConfigEdit} = { RsyncCsumCacheVerifyProb => 1, RsyncArgs => 1, RsyncRestoreArgs => 1, + RsyncClientCmd => 0, + RsyncClientRestoreCmd => 0, ArchiveDest => 1, ArchiveComp => 1, ArchivePar => 1, ArchiveSplit => 1, + ArchiveClientCmd => 0, FixedIPNetBiosNameCheck => 1, + NmbLookupCmd => 0, + NmbLookupFindHostCmd => 0, PingMaxMsec => 1, + PingCmd => 0, ClientTimeout => 1, MaxOldPerPCLogFiles => 1, CompressLevel => 1, ClientNameAlias => 1, + DumpPreUserCmd => 0, + DumpPostUserCmd => 0, + RestorePreUserCmd => 0, + RestorePostUserCmd => 0, + ArchivePreUserCmd => 0, + ArchivePostUserCmd => 0, + DumpPostShareCmd => 0, + DumpPreShareCmd => 0, EMailNotifyMinDays => 1, EMailFromUserName => 1, EMailAdminUserName => 1, diff --git a/configure.pl b/configure.pl index f20682a..d592b8f 100755 --- a/configure.pl +++ b/configure.pl @@ -37,7 +37,7 @@ # #======================================================================== # -# Version 2.1.0beta1, released 9 Apr 2004. +# Version 3.0.0alpha, released 23 Jan 2006 # # See http://backuppc.sourceforge.net. # @@ -129,13 +129,14 @@ EOF # # InstallDir which includes subdirs bin, lib, doc # -# With FHS enabled (which is the default for new installations): +# With FHS enabled (which is the default for new installations) +# the config files move to /etc/BackupPC and log files to /var/log: # # /etc/BackupPC/config.pl main config file (was $TopDir/conf/config.pl) # /etc/BackupPC/hosts hosts file (was $TopDir/conf/hosts) # /etc/BackupPC/pc/HOST.pl per-pc config file (was $TopDir/pc/HOST/config.pl) # /var/log/BackupPC log files (was $TopDir/log) -# /var/lib/BackupPC Pid, status and email info (was $TopDir/log) +# /var/log/BackupPC Pid, status and email info (was $TopDir/log) # print <Conf(); %OrigConf = %Conf; if ( !$opts{fhs} ) { - ($Conf{TopDir} = $ConfigPath) =~ s{/[^/]+/[^/]+$}{}; + ($Conf{TopDir} = $ConfigPath) =~ s{/[^/]+/[^/]+$}{} + if ( $Conf{TopDir} eq '' ); + $bpc->{LogDir} = $Conf{LogDir} = "$Conf{TopDir}/log" + if ( $Conf{LogDir} eq '' ); } - $Conf{ConfDir} = $confDir; + $bpc->{ConfDir} = $Conf{ConfDir} = $confDir; my $err = $bpc->ServerConnect($Conf{ServerHost}, $Conf{ServerPort}, 1); if ( $err eq "" ) { print < + EOF } elsif ( $type->{type} eq "boolean" ) { # checkbox diff --git a/lib/BackupPC/CGI/Lib.pm b/lib/BackupPC/CGI/Lib.pm index bec4ea8..3c7c9bd 100644 --- a/lib/BackupPC/CGI/Lib.pm +++ b/lib/BackupPC/CGI/Lib.pm @@ -333,10 +333,10 @@ sub CheckPermission || $host ne "" && !defined($Hosts->{$host}) ); if ( $Conf{CgiAdminUserGroup} ne "" ) { my($n,$p,$gid,$mem) = getgrnam($Conf{CgiAdminUserGroup}); - $Privileged ||= ($mem =~ /\b$User\b/); + $Privileged ||= ($mem =~ /\b\Q$User\E\b/); } if ( $Conf{CgiAdminUsers} ne "" ) { - $Privileged ||= ($Conf{CgiAdminUsers} =~ /\b$User\b/); + $Privileged ||= ($Conf{CgiAdminUsers} =~ /\b\Q$User\E\b/); $Privileged ||= $Conf{CgiAdminUsers} eq "*"; } $PrivAdmin = $Privileged; diff --git a/lib/BackupPC/Config/Meta.pm b/lib/BackupPC/Config/Meta.pm index 3001e45..280b67e 100644 --- a/lib/BackupPC/Config/Meta.pm +++ b/lib/BackupPC/Config/Meta.pm @@ -369,9 +369,14 @@ use vars qw(%ConfigMeta); SmbShareName => "boolean", SmbShareUserName => "boolean", SmbSharePasswd => "boolean", + SmbClientFullCmd => "boolean", + SmbClientIncrCmd => "boolean", + SmbClientRestoreCmd => "boolean", TarShareName => "boolean", TarFullArgs => "boolean", TarIncrArgs => "boolean", + TarClientCmd => "boolean", + TarClientRestoreCmd => "boolean", RsyncShareName => "boolean", RsyncdClientPort => "boolean", RsyncdPasswd => "boolean", @@ -379,16 +384,30 @@ use vars qw(%ConfigMeta); RsyncCsumCacheVerifyProb => "boolean", RsyncArgs => "boolean", RsyncRestoreArgs => "boolean", + RsyncClientCmd => "boolean", + RsyncClientRestoreCmd => "boolean", ArchiveDest => "boolean", ArchiveComp => "boolean", ArchivePar => "boolean", ArchiveSplit => "boolean", + ArchiveClientCmd => "boolean", FixedIPNetBiosNameCheck => "boolean", PingMaxMsec => "boolean", + NmbLookupCmd => "boolean", + NmbLookupFindHostCmd => "boolean", + PingCmd => "boolean", ClientTimeout => "boolean", MaxOldPerPCLogFiles => "boolean", CompressLevel => "boolean", ClientNameAlias => "boolean", + DumpPreUserCmd => "boolean", + DumpPostUserCmd => "boolean", + RestorePreUserCmd => "boolean", + RestorePostUserCmd => "boolean", + ArchivePreUserCmd => "boolean", + ArchivePostUserCmd => "boolean", + DumpPostShareCmd => "boolean", + DumpPreShareCmd => "boolean", EMailNotifyMinDays => "boolean", EMailFromUserName => "boolean", EMailAdminUserName => "boolean", diff --git a/lib/BackupPC/Lang/de.pm b/lib/BackupPC/Lang/de.pm index e112b73..c7ff0cd 100644 --- a/lib/BackupPC/Lang/de.pm +++ b/lib/BackupPC/Lang/de.pm @@ -1010,7 +1010,7 @@ $Lang{LOG_files} = "LOG Dateien"; $Lang{Old_LOGs} = "Alte LOG Dateien"; $Lang{Email_summary} = "eMail Übersicht"; $Lang{Config_file} = "Config Datei"; -$Lang{Hosts_file} = "Hosts Datei"; +# $Lang{Hosts_file} = "Hosts Datei"; $Lang{Current_queues} = "Warteschlangen"; $Lang{Documentation} = "Dokumentation"; @@ -1312,4 +1312,113 @@ EOF $Lang{howLong_not_been_backed_up} = "Backup nicht erfolgreich"; $Lang{howLong_not_been_backed_up_for_days_days} = "kein Backup seit \$days Tagen"; +####################################################################### +# Configuration editor strings (all ENGLISH currently) +####################################################################### + +$Lang{Only_privileged_users_can_edit_config_files} = "Only privileged users can edit configuation settings."; +$Lang{CfgEdit_Edit_Config} = "Edit Config"; +$Lang{CfgEdit_Edit_Hosts} = "Edit Hosts"; + +$Lang{CfgEdit_Title_Server} = "Server"; +$Lang{CfgEdit_Title_General_Parameters} = "General Parameters"; +$Lang{CfgEdit_Title_Wakeup_Schedule} = "Wakeup Schedule"; +$Lang{CfgEdit_Title_Concurrent_Jobs} = "Concurrent Jobs"; +$Lang{CfgEdit_Title_Pool_Filesystem_Limits} = "Pool Filesystem Limits"; +$Lang{CfgEdit_Title_Other_Parameters} = "Other Parameters"; +$Lang{CfgEdit_Title_Remote_Apache_Settings} = "Remote Apache Settings"; +$Lang{CfgEdit_Title_Program_Paths} = "Program Paths"; +$Lang{CfgEdit_Title_Install_Paths} = "Install Paths"; +$Lang{CfgEdit_Title_Email} = "Email"; +$Lang{CfgEdit_Title_Email_settings} = "Email settings"; +$Lang{CfgEdit_Title_Email_User_Messages} = "Email User Messages"; +$Lang{CfgEdit_Title_CGI} = "CGI"; +$Lang{CfgEdit_Title_Admin_Privileges} = "Admin Privileges"; +$Lang{CfgEdit_Title_Page_Rendering} = "Page Rendering"; +$Lang{CfgEdit_Title_Paths} = "Paths"; +$Lang{CfgEdit_Title_User_URLs} = "User URLs"; +$Lang{CfgEdit_Title_User_Config_Editing} = "User Config Editing"; +$Lang{CfgEdit_Title_Xfer} = "Xfer"; +$Lang{CfgEdit_Title_Xfer_Settings} = "Xfer Settings"; +$Lang{CfgEdit_Title_Smb_Settings} = "Smb Settings"; +$Lang{CfgEdit_Title_Tar_Settings} = "Tar Settings"; +$Lang{CfgEdit_Title_Rsync_Settings} = "Rsync Settings"; +$Lang{CfgEdit_Title_Rsyncd_Settings} = "Rsyncd Settings"; +$Lang{CfgEdit_Title_Archive_Settings} = "Archive Settings"; +$Lang{CfgEdit_Title_Include_Exclude} = "Include/Exclude"; +$Lang{CfgEdit_Title_Smb_Paths_Commands} = "Smb Paths/Commands"; +$Lang{CfgEdit_Title_Tar_Paths_Commands} = "Tar Paths/Commands"; +$Lang{CfgEdit_Title_Rsync_Paths_Commands_Args} = "Rsync Paths/Commands/Args"; +$Lang{CfgEdit_Title_Rsyncd_Port_Args} = "Rsyncd Port/Args"; +$Lang{CfgEdit_Title_Archive_Paths_Commands} = "Archive Paths/Commands"; +$Lang{CfgEdit_Title_Schedule} = "Schedule"; +$Lang{CfgEdit_Title_Full_Backups} = "Full Backups"; +$Lang{CfgEdit_Title_Incremental_Backups} = "Incremental Backups"; +$Lang{CfgEdit_Title_Blackouts} = "Blackouts"; +$Lang{CfgEdit_Title_Other} = "Other"; +$Lang{CfgEdit_Title_Backup_Settings} = "Backup Settings"; +$Lang{CfgEdit_Title_Client_Lookup} = "Client Lookup"; +$Lang{CfgEdit_Title_Other} = "Other"; +$Lang{CfgEdit_Title_User_Commands} = "User Commands"; +$Lang{CfgEdit_Title_Hosts} = "Hosts"; + +$Lang{CfgEdit_Hosts_Comment} = < +Note: Check Override if you want to modify a value specific to this host. +EOF + +$Lang{CfgEdit_Button_Save} = "Save"; +$Lang{CfgEdit_Button_Insert} = "Insert"; +$Lang{CfgEdit_Button_Delete} = "Delete"; +$Lang{CfgEdit_Button_Add} = "Add"; +$Lang{CfgEdit_Button_Override} = "Override"; + +$Lang{CfgEdit_Error__must_be_an_integer} + = "Error: \$var must be an integer"; +$Lang{CfgEdit_Error__must_be_real_valued_number} + = "Error: \$var must be a real-valued number"; +$Lang{CfgEdit_Error__entry__must_be_an_integer} + = "Error: \$var entry \$k must be an integer"; +$Lang{CfgEdit_Error__entry__must_be_real_valued_number} + = "Error: \$var entry \$k must be a real-valued number"; +$Lang{CfgEdit_Error__must_be_executable_program} + = "Error: \$var must be a valid executable path"; +$Lang{CfgEdit_Error__must_be_valid_option} + = "Error: \$var must be a valid option"; +$Lang{CfgEdit_Error_Copy_host_does_not_exist} + = "Copy host \$copyHost doesn't exist; creating full host name \$fullHost. Delete this host if that is not what you wanted."; + +$Lang{CfgEdit_Log_Copy_host_config} + = "\$User copied config from host \$fromHost to \$host\n"; +$Lang{CfgEdit_Log_Delete_param} + = "\$User deleted \$p from \$conf\n"; +$Lang{CfgEdit_Log_Add_param_value} + = "\$User added \$p to \$conf, set to \$value\n"; +$Lang{CfgEdit_Log_Change_param_value} + = "\$User changed \$p in \$conf to \$valueNew from \$valueOld\n"; +$Lang{CfgEdit_Log_Host_Delete} + = "\$User deleted host \$host\n"; +$Lang{CfgEdit_Log_Host_Change} + = "\$User host \$host changed \$key from \$valueOld to \$valueNew\n"; +$Lang{CfgEdit_Log_Host_Add} + = "\$User added host \$host: \$value\n"; + #end of lang_de.pm diff --git a/lib/BackupPC/Lang/en.pm b/lib/BackupPC/Lang/en.pm index 7b351c3..8d6d123 100644 --- a/lib/BackupPC/Lang/en.pm +++ b/lib/BackupPC/Lang/en.pm @@ -1011,7 +1011,7 @@ $Lang{LOG_files} = "LOG files"; $Lang{Old_LOGs} = "Old LOGs"; $Lang{Email_summary} = "Email summary"; $Lang{Config_file} = "Config file"; -$Lang{Hosts_file} = "Hosts file"; +# $Lang{Hosts_file} = "Hosts file"; $Lang{Current_queues} = "Current queues"; $Lang{Documentation} = "Documentation"; diff --git a/lib/BackupPC/Lang/es.pm b/lib/BackupPC/Lang/es.pm index 2011795..4d53312 100644 --- a/lib/BackupPC/Lang/es.pm +++ b/lib/BackupPC/Lang/es.pm @@ -1012,7 +1012,7 @@ $Lang{LOG_files} = "Archivos de registro"; $Lang{Old_LOGs} = "Registros antiguos"; $Lang{Email_summary} = "Resumen correo"; $Lang{Config_file} = "Archivo configuración"; -$Lang{Hosts_file} = "Archivo Hosts"; +# $Lang{Hosts_file} = "Archivo Hosts"; $Lang{Current_queues} = "Colas actuales"; $Lang{Documentation} = "Documentación"; @@ -1308,5 +1308,113 @@ EOF $Lang{howLong_not_been_backed_up} = "no se le ha realizado una copia de seguridad con éxito"; $Lang{howLong_not_been_backed_up_for_days_days} = "no se le ha realizado una copia de seguridad durante \$days días"; -#end of lang_en.pm +####################################################################### +# Configuration editor strings (all ENGLISH currently) +####################################################################### + +$Lang{Only_privileged_users_can_edit_config_files} = "Only privileged users can edit configuation settings."; +$Lang{CfgEdit_Edit_Config} = "Edit Config"; +$Lang{CfgEdit_Edit_Hosts} = "Edit Hosts"; + +$Lang{CfgEdit_Title_Server} = "Server"; +$Lang{CfgEdit_Title_General_Parameters} = "General Parameters"; +$Lang{CfgEdit_Title_Wakeup_Schedule} = "Wakeup Schedule"; +$Lang{CfgEdit_Title_Concurrent_Jobs} = "Concurrent Jobs"; +$Lang{CfgEdit_Title_Pool_Filesystem_Limits} = "Pool Filesystem Limits"; +$Lang{CfgEdit_Title_Other_Parameters} = "Other Parameters"; +$Lang{CfgEdit_Title_Remote_Apache_Settings} = "Remote Apache Settings"; +$Lang{CfgEdit_Title_Program_Paths} = "Program Paths"; +$Lang{CfgEdit_Title_Install_Paths} = "Install Paths"; +$Lang{CfgEdit_Title_Email} = "Email"; +$Lang{CfgEdit_Title_Email_settings} = "Email settings"; +$Lang{CfgEdit_Title_Email_User_Messages} = "Email User Messages"; +$Lang{CfgEdit_Title_CGI} = "CGI"; +$Lang{CfgEdit_Title_Admin_Privileges} = "Admin Privileges"; +$Lang{CfgEdit_Title_Page_Rendering} = "Page Rendering"; +$Lang{CfgEdit_Title_Paths} = "Paths"; +$Lang{CfgEdit_Title_User_URLs} = "User URLs"; +$Lang{CfgEdit_Title_User_Config_Editing} = "User Config Editing"; +$Lang{CfgEdit_Title_Xfer} = "Xfer"; +$Lang{CfgEdit_Title_Xfer_Settings} = "Xfer Settings"; +$Lang{CfgEdit_Title_Smb_Settings} = "Smb Settings"; +$Lang{CfgEdit_Title_Tar_Settings} = "Tar Settings"; +$Lang{CfgEdit_Title_Rsync_Settings} = "Rsync Settings"; +$Lang{CfgEdit_Title_Rsyncd_Settings} = "Rsyncd Settings"; +$Lang{CfgEdit_Title_Archive_Settings} = "Archive Settings"; +$Lang{CfgEdit_Title_Include_Exclude} = "Include/Exclude"; +$Lang{CfgEdit_Title_Smb_Paths_Commands} = "Smb Paths/Commands"; +$Lang{CfgEdit_Title_Tar_Paths_Commands} = "Tar Paths/Commands"; +$Lang{CfgEdit_Title_Rsync_Paths_Commands_Args} = "Rsync Paths/Commands/Args"; +$Lang{CfgEdit_Title_Rsyncd_Port_Args} = "Rsyncd Port/Args"; +$Lang{CfgEdit_Title_Archive_Paths_Commands} = "Archive Paths/Commands"; +$Lang{CfgEdit_Title_Schedule} = "Schedule"; +$Lang{CfgEdit_Title_Full_Backups} = "Full Backups"; +$Lang{CfgEdit_Title_Incremental_Backups} = "Incremental Backups"; +$Lang{CfgEdit_Title_Blackouts} = "Blackouts"; +$Lang{CfgEdit_Title_Other} = "Other"; +$Lang{CfgEdit_Title_Backup_Settings} = "Backup Settings"; +$Lang{CfgEdit_Title_Client_Lookup} = "Client Lookup"; +$Lang{CfgEdit_Title_Other} = "Other"; +$Lang{CfgEdit_Title_User_Commands} = "User Commands"; +$Lang{CfgEdit_Title_Hosts} = "Hosts"; + +$Lang{CfgEdit_Hosts_Comment} = < +Note: Check Override if you want to modify a value specific to this host. +EOF + +$Lang{CfgEdit_Button_Save} = "Save"; +$Lang{CfgEdit_Button_Insert} = "Insert"; +$Lang{CfgEdit_Button_Delete} = "Delete"; +$Lang{CfgEdit_Button_Add} = "Add"; +$Lang{CfgEdit_Button_Override} = "Override"; + +$Lang{CfgEdit_Error__must_be_an_integer} + = "Error: \$var must be an integer"; +$Lang{CfgEdit_Error__must_be_real_valued_number} + = "Error: \$var must be a real-valued number"; +$Lang{CfgEdit_Error__entry__must_be_an_integer} + = "Error: \$var entry \$k must be an integer"; +$Lang{CfgEdit_Error__entry__must_be_real_valued_number} + = "Error: \$var entry \$k must be a real-valued number"; +$Lang{CfgEdit_Error__must_be_executable_program} + = "Error: \$var must be a valid executable path"; +$Lang{CfgEdit_Error__must_be_valid_option} + = "Error: \$var must be a valid option"; +$Lang{CfgEdit_Error_Copy_host_does_not_exist} + = "Copy host \$copyHost doesn't exist; creating full host name \$fullHost. Delete this host if that is not what you wanted."; + +$Lang{CfgEdit_Log_Copy_host_config} + = "\$User copied config from host \$fromHost to \$host\n"; +$Lang{CfgEdit_Log_Delete_param} + = "\$User deleted \$p from \$conf\n"; +$Lang{CfgEdit_Log_Add_param_value} + = "\$User added \$p to \$conf, set to \$value\n"; +$Lang{CfgEdit_Log_Change_param_value} + = "\$User changed \$p in \$conf to \$valueNew from \$valueOld\n"; +$Lang{CfgEdit_Log_Host_Delete} + = "\$User deleted host \$host\n"; +$Lang{CfgEdit_Log_Host_Change} + = "\$User host \$host changed \$key from \$valueOld to \$valueNew\n"; +$Lang{CfgEdit_Log_Host_Add} + = "\$User added host \$host: \$value\n"; + +#end of lang_en.pm diff --git a/lib/BackupPC/Lang/fr.pm b/lib/BackupPC/Lang/fr.pm index 8e93c32..856a45c 100644 --- a/lib/BackupPC/Lang/fr.pm +++ b/lib/BackupPC/Lang/fr.pm @@ -664,7 +664,7 @@ Les fichiers existants sont ceux qui sont d Les nouveaux fichiers sont ceux qui ont été ajoutés au serveur. Les fichiers vides et les erreurs de SMB ne sont pas comptabilisés parmi les nouveaux et les réutilisés.

- +
@@ -1009,7 +1009,7 @@ $Lang{LOG_files} = "Fichiers journaux"; $Lang{Old_LOGs} = "Vieux journaux"; $Lang{Email_summary} = "Résumé des courriels"; $Lang{Config_file} = "Fichier de configuration"; -$Lang{Hosts_file} = "Fichiers des hôtes"; +# $Lang{Hosts_file} = "Fichiers des hôtes"; $Lang{Current_queues} = "Files actuelles"; $Lang{Documentation} = "Documentation"; @@ -1304,4 +1304,113 @@ EOF $Lang{howLong_not_been_backed_up} = "jamais étés sauvegardés"; $Lang{howLong_not_been_backed_up_for_days_days} = "pas été sauvegardés depuis \$days jours"; +####################################################################### +# Configuration editor strings (all ENGLISH currently) +####################################################################### + +$Lang{Only_privileged_users_can_edit_config_files} = "Only privileged users can edit configuation settings."; +$Lang{CfgEdit_Edit_Config} = "Edit Config"; +$Lang{CfgEdit_Edit_Hosts} = "Edit Hosts"; + +$Lang{CfgEdit_Title_Server} = "Server"; +$Lang{CfgEdit_Title_General_Parameters} = "General Parameters"; +$Lang{CfgEdit_Title_Wakeup_Schedule} = "Wakeup Schedule"; +$Lang{CfgEdit_Title_Concurrent_Jobs} = "Concurrent Jobs"; +$Lang{CfgEdit_Title_Pool_Filesystem_Limits} = "Pool Filesystem Limits"; +$Lang{CfgEdit_Title_Other_Parameters} = "Other Parameters"; +$Lang{CfgEdit_Title_Remote_Apache_Settings} = "Remote Apache Settings"; +$Lang{CfgEdit_Title_Program_Paths} = "Program Paths"; +$Lang{CfgEdit_Title_Install_Paths} = "Install Paths"; +$Lang{CfgEdit_Title_Email} = "Email"; +$Lang{CfgEdit_Title_Email_settings} = "Email settings"; +$Lang{CfgEdit_Title_Email_User_Messages} = "Email User Messages"; +$Lang{CfgEdit_Title_CGI} = "CGI"; +$Lang{CfgEdit_Title_Admin_Privileges} = "Admin Privileges"; +$Lang{CfgEdit_Title_Page_Rendering} = "Page Rendering"; +$Lang{CfgEdit_Title_Paths} = "Paths"; +$Lang{CfgEdit_Title_User_URLs} = "User URLs"; +$Lang{CfgEdit_Title_User_Config_Editing} = "User Config Editing"; +$Lang{CfgEdit_Title_Xfer} = "Xfer"; +$Lang{CfgEdit_Title_Xfer_Settings} = "Xfer Settings"; +$Lang{CfgEdit_Title_Smb_Settings} = "Smb Settings"; +$Lang{CfgEdit_Title_Tar_Settings} = "Tar Settings"; +$Lang{CfgEdit_Title_Rsync_Settings} = "Rsync Settings"; +$Lang{CfgEdit_Title_Rsyncd_Settings} = "Rsyncd Settings"; +$Lang{CfgEdit_Title_Archive_Settings} = "Archive Settings"; +$Lang{CfgEdit_Title_Include_Exclude} = "Include/Exclude"; +$Lang{CfgEdit_Title_Smb_Paths_Commands} = "Smb Paths/Commands"; +$Lang{CfgEdit_Title_Tar_Paths_Commands} = "Tar Paths/Commands"; +$Lang{CfgEdit_Title_Rsync_Paths_Commands_Args} = "Rsync Paths/Commands/Args"; +$Lang{CfgEdit_Title_Rsyncd_Port_Args} = "Rsyncd Port/Args"; +$Lang{CfgEdit_Title_Archive_Paths_Commands} = "Archive Paths/Commands"; +$Lang{CfgEdit_Title_Schedule} = "Schedule"; +$Lang{CfgEdit_Title_Full_Backups} = "Full Backups"; +$Lang{CfgEdit_Title_Incremental_Backups} = "Incremental Backups"; +$Lang{CfgEdit_Title_Blackouts} = "Blackouts"; +$Lang{CfgEdit_Title_Other} = "Other"; +$Lang{CfgEdit_Title_Backup_Settings} = "Backup Settings"; +$Lang{CfgEdit_Title_Client_Lookup} = "Client Lookup"; +$Lang{CfgEdit_Title_Other} = "Other"; +$Lang{CfgEdit_Title_User_Commands} = "User Commands"; +$Lang{CfgEdit_Title_Hosts} = "Hosts"; + +$Lang{CfgEdit_Hosts_Comment} = < +Note: Check Override if you want to modify a value specific to this host. +EOF + +$Lang{CfgEdit_Button_Save} = "Save"; +$Lang{CfgEdit_Button_Insert} = "Insert"; +$Lang{CfgEdit_Button_Delete} = "Delete"; +$Lang{CfgEdit_Button_Add} = "Add"; +$Lang{CfgEdit_Button_Override} = "Override"; + +$Lang{CfgEdit_Error__must_be_an_integer} + = "Error: \$var must be an integer"; +$Lang{CfgEdit_Error__must_be_real_valued_number} + = "Error: \$var must be a real-valued number"; +$Lang{CfgEdit_Error__entry__must_be_an_integer} + = "Error: \$var entry \$k must be an integer"; +$Lang{CfgEdit_Error__entry__must_be_real_valued_number} + = "Error: \$var entry \$k must be a real-valued number"; +$Lang{CfgEdit_Error__must_be_executable_program} + = "Error: \$var must be a valid executable path"; +$Lang{CfgEdit_Error__must_be_valid_option} + = "Error: \$var must be a valid option"; +$Lang{CfgEdit_Error_Copy_host_does_not_exist} + = "Copy host \$copyHost doesn't exist; creating full host name \$fullHost. Delete this host if that is not what you wanted."; + +$Lang{CfgEdit_Log_Copy_host_config} + = "\$User copied config from host \$fromHost to \$host\n"; +$Lang{CfgEdit_Log_Delete_param} + = "\$User deleted \$p from \$conf\n"; +$Lang{CfgEdit_Log_Add_param_value} + = "\$User added \$p to \$conf, set to \$value\n"; +$Lang{CfgEdit_Log_Change_param_value} + = "\$User changed \$p in \$conf to \$valueNew from \$valueOld\n"; +$Lang{CfgEdit_Log_Host_Delete} + = "\$User deleted host \$host\n"; +$Lang{CfgEdit_Log_Host_Change} + = "\$User host \$host changed \$key from \$valueOld to \$valueNew\n"; +$Lang{CfgEdit_Log_Host_Add} + = "\$User added host \$host: \$value\n"; + #end of lang_fr.pm diff --git a/lib/BackupPC/Lang/it.pm b/lib/BackupPC/Lang/it.pm index 8927c72..4d30823 100644 --- a/lib/BackupPC/Lang/it.pm +++ b/lib/BackupPC/Lang/it.pm @@ -1020,7 +1020,7 @@ $Lang{LOG_files} = "File log"; $Lang{Old_LOGs} = "Vecchi log"; $Lang{Email_summary} = "Prospetto email"; $Lang{Config_file} = "File configurazione"; -$Lang{Hosts_file} = "File host"; +# $Lang{Hosts_file} = "File host"; $Lang{Current_queues} = "Code correnti"; $Lang{Documentation} = "Documentazione"; @@ -1314,3 +1314,113 @@ EOF $Lang{howLong_not_been_backed_up} = "non e` riuscito"; $Lang{howLong_not_been_backed_up_for_days_days} = "risale a \$days giorni fa"; + +####################################################################### +# Configuration editor strings (all ENGLISH currently) +####################################################################### + +$Lang{Only_privileged_users_can_edit_config_files} = "Only privileged users can edit configuation settings."; +$Lang{CfgEdit_Edit_Config} = "Edit Config"; +$Lang{CfgEdit_Edit_Hosts} = "Edit Hosts"; + +$Lang{CfgEdit_Title_Server} = "Server"; +$Lang{CfgEdit_Title_General_Parameters} = "General Parameters"; +$Lang{CfgEdit_Title_Wakeup_Schedule} = "Wakeup Schedule"; +$Lang{CfgEdit_Title_Concurrent_Jobs} = "Concurrent Jobs"; +$Lang{CfgEdit_Title_Pool_Filesystem_Limits} = "Pool Filesystem Limits"; +$Lang{CfgEdit_Title_Other_Parameters} = "Other Parameters"; +$Lang{CfgEdit_Title_Remote_Apache_Settings} = "Remote Apache Settings"; +$Lang{CfgEdit_Title_Program_Paths} = "Program Paths"; +$Lang{CfgEdit_Title_Install_Paths} = "Install Paths"; +$Lang{CfgEdit_Title_Email} = "Email"; +$Lang{CfgEdit_Title_Email_settings} = "Email settings"; +$Lang{CfgEdit_Title_Email_User_Messages} = "Email User Messages"; +$Lang{CfgEdit_Title_CGI} = "CGI"; +$Lang{CfgEdit_Title_Admin_Privileges} = "Admin Privileges"; +$Lang{CfgEdit_Title_Page_Rendering} = "Page Rendering"; +$Lang{CfgEdit_Title_Paths} = "Paths"; +$Lang{CfgEdit_Title_User_URLs} = "User URLs"; +$Lang{CfgEdit_Title_User_Config_Editing} = "User Config Editing"; +$Lang{CfgEdit_Title_Xfer} = "Xfer"; +$Lang{CfgEdit_Title_Xfer_Settings} = "Xfer Settings"; +$Lang{CfgEdit_Title_Smb_Settings} = "Smb Settings"; +$Lang{CfgEdit_Title_Tar_Settings} = "Tar Settings"; +$Lang{CfgEdit_Title_Rsync_Settings} = "Rsync Settings"; +$Lang{CfgEdit_Title_Rsyncd_Settings} = "Rsyncd Settings"; +$Lang{CfgEdit_Title_Archive_Settings} = "Archive Settings"; +$Lang{CfgEdit_Title_Include_Exclude} = "Include/Exclude"; +$Lang{CfgEdit_Title_Smb_Paths_Commands} = "Smb Paths/Commands"; +$Lang{CfgEdit_Title_Tar_Paths_Commands} = "Tar Paths/Commands"; +$Lang{CfgEdit_Title_Rsync_Paths_Commands_Args} = "Rsync Paths/Commands/Args"; +$Lang{CfgEdit_Title_Rsyncd_Port_Args} = "Rsyncd Port/Args"; +$Lang{CfgEdit_Title_Archive_Paths_Commands} = "Archive Paths/Commands"; +$Lang{CfgEdit_Title_Schedule} = "Schedule"; +$Lang{CfgEdit_Title_Full_Backups} = "Full Backups"; +$Lang{CfgEdit_Title_Incremental_Backups} = "Incremental Backups"; +$Lang{CfgEdit_Title_Blackouts} = "Blackouts"; +$Lang{CfgEdit_Title_Other} = "Other"; +$Lang{CfgEdit_Title_Backup_Settings} = "Backup Settings"; +$Lang{CfgEdit_Title_Client_Lookup} = "Client Lookup"; +$Lang{CfgEdit_Title_Other} = "Other"; +$Lang{CfgEdit_Title_User_Commands} = "User Commands"; +$Lang{CfgEdit_Title_Hosts} = "Hosts"; + +$Lang{CfgEdit_Hosts_Comment} = < +Note: Check Override if you want to modify a value specific to this host. +EOF + +$Lang{CfgEdit_Button_Save} = "Save"; +$Lang{CfgEdit_Button_Insert} = "Insert"; +$Lang{CfgEdit_Button_Delete} = "Delete"; +$Lang{CfgEdit_Button_Add} = "Add"; +$Lang{CfgEdit_Button_Override} = "Override"; + +$Lang{CfgEdit_Error__must_be_an_integer} + = "Error: \$var must be an integer"; +$Lang{CfgEdit_Error__must_be_real_valued_number} + = "Error: \$var must be a real-valued number"; +$Lang{CfgEdit_Error__entry__must_be_an_integer} + = "Error: \$var entry \$k must be an integer"; +$Lang{CfgEdit_Error__entry__must_be_real_valued_number} + = "Error: \$var entry \$k must be a real-valued number"; +$Lang{CfgEdit_Error__must_be_executable_program} + = "Error: \$var must be a valid executable path"; +$Lang{CfgEdit_Error__must_be_valid_option} + = "Error: \$var must be a valid option"; +$Lang{CfgEdit_Error_Copy_host_does_not_exist} + = "Copy host \$copyHost doesn't exist; creating full host name \$fullHost. Delete this host if that is not what you wanted."; + +$Lang{CfgEdit_Log_Copy_host_config} + = "\$User copied config from host \$fromHost to \$host\n"; +$Lang{CfgEdit_Log_Delete_param} + = "\$User deleted \$p from \$conf\n"; +$Lang{CfgEdit_Log_Add_param_value} + = "\$User added \$p to \$conf, set to \$value\n"; +$Lang{CfgEdit_Log_Change_param_value} + = "\$User changed \$p in \$conf to \$valueNew from \$valueOld\n"; +$Lang{CfgEdit_Log_Host_Delete} + = "\$User deleted host \$host\n"; +$Lang{CfgEdit_Log_Host_Change} + = "\$User host \$host changed \$key from \$valueOld to \$valueNew\n"; +$Lang{CfgEdit_Log_Host_Add} + = "\$User added host \$host: \$value\n"; + diff --git a/lib/BackupPC/Lang/nl.pm b/lib/BackupPC/Lang/nl.pm index 279a0d5..3c6f30e 100644 --- a/lib/BackupPC/Lang/nl.pm +++ b/lib/BackupPC/Lang/nl.pm @@ -1012,7 +1012,7 @@ $Lang{LOG_files} = "LOG-bestanden"; $Lang{Old_LOGs} = "Oude LOGs"; $Lang{Email_summary} = "E-mailoverzicht"; $Lang{Config_file} = "Configuratiebest."; -$Lang{Hosts_file} = "Hosts-bestand"; +# $Lang{Hosts_file} = "Hosts-bestand"; $Lang{Current_queues} = "Huidige wachtrij"; $Lang{Documentation} = "Documentatie"; @@ -1317,6 +1317,113 @@ EOF $Lang{howLong_not_been_backed_up} = "(nog) niet succesvol gebackupt"; $Lang{howLong_not_been_backed_up_for_days_days} = "reeds sedert \$days dagen niet gebackupt"; -#end of lang_nl.pm +####################################################################### +# Configuration editor strings (all ENGLISH currently) +####################################################################### + +$Lang{Only_privileged_users_can_edit_config_files} = "Only privileged users can edit configuation settings."; +$Lang{CfgEdit_Edit_Config} = "Edit Config"; +$Lang{CfgEdit_Edit_Hosts} = "Edit Hosts"; + +$Lang{CfgEdit_Title_Server} = "Server"; +$Lang{CfgEdit_Title_General_Parameters} = "General Parameters"; +$Lang{CfgEdit_Title_Wakeup_Schedule} = "Wakeup Schedule"; +$Lang{CfgEdit_Title_Concurrent_Jobs} = "Concurrent Jobs"; +$Lang{CfgEdit_Title_Pool_Filesystem_Limits} = "Pool Filesystem Limits"; +$Lang{CfgEdit_Title_Other_Parameters} = "Other Parameters"; +$Lang{CfgEdit_Title_Remote_Apache_Settings} = "Remote Apache Settings"; +$Lang{CfgEdit_Title_Program_Paths} = "Program Paths"; +$Lang{CfgEdit_Title_Install_Paths} = "Install Paths"; +$Lang{CfgEdit_Title_Email} = "Email"; +$Lang{CfgEdit_Title_Email_settings} = "Email settings"; +$Lang{CfgEdit_Title_Email_User_Messages} = "Email User Messages"; +$Lang{CfgEdit_Title_CGI} = "CGI"; +$Lang{CfgEdit_Title_Admin_Privileges} = "Admin Privileges"; +$Lang{CfgEdit_Title_Page_Rendering} = "Page Rendering"; +$Lang{CfgEdit_Title_Paths} = "Paths"; +$Lang{CfgEdit_Title_User_URLs} = "User URLs"; +$Lang{CfgEdit_Title_User_Config_Editing} = "User Config Editing"; +$Lang{CfgEdit_Title_Xfer} = "Xfer"; +$Lang{CfgEdit_Title_Xfer_Settings} = "Xfer Settings"; +$Lang{CfgEdit_Title_Smb_Settings} = "Smb Settings"; +$Lang{CfgEdit_Title_Tar_Settings} = "Tar Settings"; +$Lang{CfgEdit_Title_Rsync_Settings} = "Rsync Settings"; +$Lang{CfgEdit_Title_Rsyncd_Settings} = "Rsyncd Settings"; +$Lang{CfgEdit_Title_Archive_Settings} = "Archive Settings"; +$Lang{CfgEdit_Title_Include_Exclude} = "Include/Exclude"; +$Lang{CfgEdit_Title_Smb_Paths_Commands} = "Smb Paths/Commands"; +$Lang{CfgEdit_Title_Tar_Paths_Commands} = "Tar Paths/Commands"; +$Lang{CfgEdit_Title_Rsync_Paths_Commands_Args} = "Rsync Paths/Commands/Args"; +$Lang{CfgEdit_Title_Rsyncd_Port_Args} = "Rsyncd Port/Args"; +$Lang{CfgEdit_Title_Archive_Paths_Commands} = "Archive Paths/Commands"; +$Lang{CfgEdit_Title_Schedule} = "Schedule"; +$Lang{CfgEdit_Title_Full_Backups} = "Full Backups"; +$Lang{CfgEdit_Title_Incremental_Backups} = "Incremental Backups"; +$Lang{CfgEdit_Title_Blackouts} = "Blackouts"; +$Lang{CfgEdit_Title_Other} = "Other"; +$Lang{CfgEdit_Title_Backup_Settings} = "Backup Settings"; +$Lang{CfgEdit_Title_Client_Lookup} = "Client Lookup"; +$Lang{CfgEdit_Title_Other} = "Other"; +$Lang{CfgEdit_Title_User_Commands} = "User Commands"; +$Lang{CfgEdit_Title_Hosts} = "Hosts"; + +$Lang{CfgEdit_Hosts_Comment} = < +Note: Check Override if you want to modify a value specific to this host. +EOF +$Lang{CfgEdit_Button_Save} = "Save"; +$Lang{CfgEdit_Button_Insert} = "Insert"; +$Lang{CfgEdit_Button_Delete} = "Delete"; +$Lang{CfgEdit_Button_Add} = "Add"; +$Lang{CfgEdit_Button_Override} = "Override"; + +$Lang{CfgEdit_Error__must_be_an_integer} + = "Error: \$var must be an integer"; +$Lang{CfgEdit_Error__must_be_real_valued_number} + = "Error: \$var must be a real-valued number"; +$Lang{CfgEdit_Error__entry__must_be_an_integer} + = "Error: \$var entry \$k must be an integer"; +$Lang{CfgEdit_Error__entry__must_be_real_valued_number} + = "Error: \$var entry \$k must be a real-valued number"; +$Lang{CfgEdit_Error__must_be_executable_program} + = "Error: \$var must be a valid executable path"; +$Lang{CfgEdit_Error__must_be_valid_option} + = "Error: \$var must be a valid option"; +$Lang{CfgEdit_Error_Copy_host_does_not_exist} + = "Copy host \$copyHost doesn't exist; creating full host name \$fullHost. Delete this host if that is not what you wanted."; + +$Lang{CfgEdit_Log_Copy_host_config} + = "\$User copied config from host \$fromHost to \$host\n"; +$Lang{CfgEdit_Log_Delete_param} + = "\$User deleted \$p from \$conf\n"; +$Lang{CfgEdit_Log_Add_param_value} + = "\$User added \$p to \$conf, set to \$value\n"; +$Lang{CfgEdit_Log_Change_param_value} + = "\$User changed \$p in \$conf to \$valueNew from \$valueOld\n"; +$Lang{CfgEdit_Log_Host_Delete} + = "\$User deleted host \$host\n"; +$Lang{CfgEdit_Log_Host_Change} + = "\$User host \$host changed \$key from \$valueOld to \$valueNew\n"; +$Lang{CfgEdit_Log_Host_Add} + = "\$User added host \$host: \$value\n"; + +#end of lang_nl.pm diff --git a/lib/BackupPC/Lang/pt_br.pm b/lib/BackupPC/Lang/pt_br.pm index bcaac03..2fbf854 100644 --- a/lib/BackupPC/Lang/pt_br.pm +++ b/lib/BackupPC/Lang/pt_br.pm @@ -1013,7 +1013,7 @@ $Lang{LOG_files} = "Arquivos de Log"; $Lang{Old_LOGs} = "Logs antigos"; $Lang{Email_summary} = "Resumo Email"; $Lang{Config_file} = "Arquivo configuração"; -$Lang{Hosts_file} = "Arquivo Hosts"; +# $Lang{Hosts_file} = "Arquivo Hosts"; $Lang{Current_queues} = "Filas atuais"; $Lang{Documentation} = "Documentação"; @@ -1307,6 +1307,113 @@ EOF $Lang{howLong_not_been_backed_up} = "não foi realizado nenhum backup com êxito"; $Lang{howLong_not_been_backed_up_for_days_days} = "não foi realizado nenhum backup durante \$days dias"; -#end of lang_pt_BR.pm +####################################################################### +# Configuration editor strings (all ENGLISH currently) +####################################################################### + +$Lang{Only_privileged_users_can_edit_config_files} = "Only privileged users can edit configuation settings."; +$Lang{CfgEdit_Edit_Config} = "Edit Config"; +$Lang{CfgEdit_Edit_Hosts} = "Edit Hosts"; + +$Lang{CfgEdit_Title_Server} = "Server"; +$Lang{CfgEdit_Title_General_Parameters} = "General Parameters"; +$Lang{CfgEdit_Title_Wakeup_Schedule} = "Wakeup Schedule"; +$Lang{CfgEdit_Title_Concurrent_Jobs} = "Concurrent Jobs"; +$Lang{CfgEdit_Title_Pool_Filesystem_Limits} = "Pool Filesystem Limits"; +$Lang{CfgEdit_Title_Other_Parameters} = "Other Parameters"; +$Lang{CfgEdit_Title_Remote_Apache_Settings} = "Remote Apache Settings"; +$Lang{CfgEdit_Title_Program_Paths} = "Program Paths"; +$Lang{CfgEdit_Title_Install_Paths} = "Install Paths"; +$Lang{CfgEdit_Title_Email} = "Email"; +$Lang{CfgEdit_Title_Email_settings} = "Email settings"; +$Lang{CfgEdit_Title_Email_User_Messages} = "Email User Messages"; +$Lang{CfgEdit_Title_CGI} = "CGI"; +$Lang{CfgEdit_Title_Admin_Privileges} = "Admin Privileges"; +$Lang{CfgEdit_Title_Page_Rendering} = "Page Rendering"; +$Lang{CfgEdit_Title_Paths} = "Paths"; +$Lang{CfgEdit_Title_User_URLs} = "User URLs"; +$Lang{CfgEdit_Title_User_Config_Editing} = "User Config Editing"; +$Lang{CfgEdit_Title_Xfer} = "Xfer"; +$Lang{CfgEdit_Title_Xfer_Settings} = "Xfer Settings"; +$Lang{CfgEdit_Title_Smb_Settings} = "Smb Settings"; +$Lang{CfgEdit_Title_Tar_Settings} = "Tar Settings"; +$Lang{CfgEdit_Title_Rsync_Settings} = "Rsync Settings"; +$Lang{CfgEdit_Title_Rsyncd_Settings} = "Rsyncd Settings"; +$Lang{CfgEdit_Title_Archive_Settings} = "Archive Settings"; +$Lang{CfgEdit_Title_Include_Exclude} = "Include/Exclude"; +$Lang{CfgEdit_Title_Smb_Paths_Commands} = "Smb Paths/Commands"; +$Lang{CfgEdit_Title_Tar_Paths_Commands} = "Tar Paths/Commands"; +$Lang{CfgEdit_Title_Rsync_Paths_Commands_Args} = "Rsync Paths/Commands/Args"; +$Lang{CfgEdit_Title_Rsyncd_Port_Args} = "Rsyncd Port/Args"; +$Lang{CfgEdit_Title_Archive_Paths_Commands} = "Archive Paths/Commands"; +$Lang{CfgEdit_Title_Schedule} = "Schedule"; +$Lang{CfgEdit_Title_Full_Backups} = "Full Backups"; +$Lang{CfgEdit_Title_Incremental_Backups} = "Incremental Backups"; +$Lang{CfgEdit_Title_Blackouts} = "Blackouts"; +$Lang{CfgEdit_Title_Other} = "Other"; +$Lang{CfgEdit_Title_Backup_Settings} = "Backup Settings"; +$Lang{CfgEdit_Title_Client_Lookup} = "Client Lookup"; +$Lang{CfgEdit_Title_Other} = "Other"; +$Lang{CfgEdit_Title_User_Commands} = "User Commands"; +$Lang{CfgEdit_Title_Hosts} = "Hosts"; + +$Lang{CfgEdit_Hosts_Comment} = < +Note: Check Override if you want to modify a value specific to this host. +EOF + +$Lang{CfgEdit_Button_Save} = "Save"; +$Lang{CfgEdit_Button_Insert} = "Insert"; +$Lang{CfgEdit_Button_Delete} = "Delete"; +$Lang{CfgEdit_Button_Add} = "Add"; +$Lang{CfgEdit_Button_Override} = "Override"; + +$Lang{CfgEdit_Error__must_be_an_integer} + = "Error: \$var must be an integer"; +$Lang{CfgEdit_Error__must_be_real_valued_number} + = "Error: \$var must be a real-valued number"; +$Lang{CfgEdit_Error__entry__must_be_an_integer} + = "Error: \$var entry \$k must be an integer"; +$Lang{CfgEdit_Error__entry__must_be_real_valued_number} + = "Error: \$var entry \$k must be a real-valued number"; +$Lang{CfgEdit_Error__must_be_executable_program} + = "Error: \$var must be a valid executable path"; +$Lang{CfgEdit_Error__must_be_valid_option} + = "Error: \$var must be a valid option"; +$Lang{CfgEdit_Error_Copy_host_does_not_exist} + = "Copy host \$copyHost doesn't exist; creating full host name \$fullHost. Delete this host if that is not what you wanted."; + +$Lang{CfgEdit_Log_Copy_host_config} + = "\$User copied config from host \$fromHost to \$host\n"; +$Lang{CfgEdit_Log_Delete_param} + = "\$User deleted \$p from \$conf\n"; +$Lang{CfgEdit_Log_Add_param_value} + = "\$User added \$p to \$conf, set to \$value\n"; +$Lang{CfgEdit_Log_Change_param_value} + = "\$User changed \$p in \$conf to \$valueNew from \$valueOld\n"; +$Lang{CfgEdit_Log_Host_Delete} + = "\$User deleted host \$host\n"; +$Lang{CfgEdit_Log_Host_Change} + = "\$User host \$host changed \$key from \$valueOld to \$valueNew\n"; +$Lang{CfgEdit_Log_Host_Add} + = "\$User added host \$host: \$value\n"; + +#end of lang_pt_BR.pm diff --git a/lib/BackupPC/Lib.pm b/lib/BackupPC/Lib.pm index 251f909..48c4766 100644 --- a/lib/BackupPC/Lib.pm +++ b/lib/BackupPC/Lib.pm @@ -76,21 +76,19 @@ sub new # if ( $useFHS ) { $paths = { - useFHS => $useFHS, - TopDir => $topDir, - BinDir => "$installDir/bin", - LibDir => "$installDir/lib", - ConfDir => $confDir eq "" ? '/etc/BackupPC' : $confDir, - LogDir => '/var/log/BackupPC', + useFHS => $useFHS, + TopDir => $topDir, + InstallDir => $installDir, + ConfDir => $confDir eq "" ? '/etc/BackupPC' : $confDir, + LogDir => '/var/log/BackupPC', }; } else { $paths = { - useFHS => $useFHS, - TopDir => $topDir, - BinDir => "$installDir/bin", - LibDir => "$installDir/lib", - ConfDir => $confDir eq "" ? "$topDir/conf" : $confDir, - LogDir => "$topDir/log", + useFHS => $useFHS, + TopDir => $topDir, + InstallDir => $installDir, + ConfDir => $confDir eq "" ? "$topDir/conf" : $confDir, + LogDir => "$topDir/log", }; } @@ -115,8 +113,8 @@ sub new # # Update the paths based on the config file # - foreach my $dir ( qw(TopDir BinDir LibDir ConfDir LogDir) ) { - next if ( !defined($bpc->{Conf}{$dir}) ); + foreach my $dir ( qw(TopDir ConfDir InstallDir LogDir) ) { + next if ( $bpc->{Conf}{$dir} eq "" ); $paths->{$dir} = $bpc->{$dir} = $bpc->{Conf}{$dir}; } $bpc->{storage}->setPaths($paths); @@ -143,7 +141,7 @@ sub TopDir sub BinDir { my($bpc) = @_; - return $bpc->{BinDir}; + return "$bpc->{InstallDir}/bin"; } sub LogDir @@ -161,7 +159,13 @@ sub ConfDir sub LibDir { my($bpc) = @_; - return $bpc->{LibDir}; + return "$bpc->{InstallDir}/lib"; +} + +sub InstallDir +{ + my($bpc) = @_; + return $bpc->{InstallDir}; } sub useFHS @@ -347,7 +351,7 @@ sub ConfigRead # Load language file # return "No language setting" if ( !defined($bpc->{Conf}{Language}) ); - my $langFile = "$bpc->{LibDir}/BackupPC/Lang/$bpc->{Conf}{Language}.pm"; + my $langFile = "$bpc->{InstallDir}/lib/BackupPC/Lang/$bpc->{Conf}{Language}.pm"; if ( !defined($ret = do $langFile) && ($! || $@) ) { $mesg = "Couldn't open language file $langFile: $!" if ( $! ); $mesg = "Couldn't execute language file $langFile: $@" if ( $@ ); diff --git a/lib/BackupPC/Storage/Text.pm b/lib/BackupPC/Storage/Text.pm index 18f5913..4213106 100644 --- a/lib/BackupPC/Storage/Text.pm +++ b/lib/BackupPC/Storage/Text.pm @@ -340,15 +340,19 @@ sub ConfigFileMerge $contents .= "\$Conf{$var} = " . $value; $done->{$var} = 1; } - $endLine = $1 if ( /^\s*\$Conf\{[^}]*} *= *<<(.*);/ ); - $endLine = $1 if ( /^\s*\$Conf\{[^}]*} *= *<<'(.*)';/ ); + if ( /^\s*\$Conf\{[^}]*} *= *<<(.*);/ + || /^\s*\$Conf\{[^}]*} *= *<<'(.*)';/ ) { + $endLine = $1; + $skipVar = 1; + } else { + $endLine = undef; + $skipVar = /^[^#]*;/ ? 0 : 1; + } $out = ""; - $skipVar = 1; } elsif ( $skipVar ) { - if ( !defined($endLine) && (/^\s*[\r\n]*$/ || /^\s*#/) ) { + if ( !defined($endLine) && /^[^#]*;/ ) { $skipVar = 0; $comment = 1; - $out .= $_; } if ( defined($endLine) && /^\Q$endLine\E[\n\r]*$/ ) { $endLine = undef; diff --git a/lib/BackupPC/Xfer/RsyncDigest.pm b/lib/BackupPC/Xfer/RsyncDigest.pm index 6126938..d20d671 100644 --- a/lib/BackupPC/Xfer/RsyncDigest.pm +++ b/lib/BackupPC/Xfer/RsyncDigest.pm @@ -42,6 +42,7 @@ use BackupPC::FileZIO; use vars qw( $RsyncLibOK ); use Carp; +use Fcntl; require Exporter; use vars qw( @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS ); @@ -100,7 +101,7 @@ sub fileDigestIsCached my($class, $file) = @_; my $data; - open(my $fh, "<", $file) || return -1; + sysopen(my $fh, $file, O_RDONLY) || return -1; binmode($fh); return -2 if ( sysread($fh, $data, 1) != 1 ); close($fh); @@ -113,6 +114,7 @@ sub fileDigestIsCached # Empty files don't get cached checksums. # # If verify is set then existing cached checksums are checked. +# If verify == 2 then only a verify is done; no fixes are applied. # # Returns 0 on success. Returns 1 on good verify and 2 on bad verify. # Returns a variety of negative values on error. @@ -142,8 +144,10 @@ sub digestAdd return -102 if ( !defined(my $fh = BackupPC::FileZIO->open($file, 0, 1)) ); + my $fileSize; while ( 1 ) { $fh->read(\$data, $nBlks * $blockSize); + $fileSize += length($data); last if ( $data eq "" ); $blockDigest .= $digest->blockDigest($data, $blockSize, 16, $checksumSeed); @@ -164,7 +168,7 @@ sub digestAdd # length($metaData), # $file, # $eofPosn); - open(my $fh2, "+<", $file) || return -103; + sysopen(my $fh2, $file, O_RDWR) || return -103; binmode($fh2); return -104 if ( sysread($fh2, $data, 1) != 1 ); if ( $data ne chr(0x78) && $data ne chr(0xd6) ) { @@ -187,9 +191,13 @@ sub digestAdd # # Checksums don't agree - fall through so we rewrite the data # - &$Log("digestAdd: $file verify failed; redoing checksums"); + &$Log(sprintf("digestAdd: %s verify failed; redoing checksums; len = %d,%d; eofPosn = %d, fileSize = %d", + $file, length($data2), length($data3), $eofPosn, $fileSize)); + #&$Log(sprintf("dataNew = %s", unpack("H*", $data2))); + #&$Log(sprintf("dataFile = %s", unpack("H*", $data3))); return -109 if ( sysseek($fh2, $eofPosn, 0) != $eofPosn ); $retValue = 2; + return $retValue if ( $verify == 2 ); } return -110 if ( syswrite($fh2, $data2) != length($data2) ); if ( $verify ) { @@ -205,7 +213,8 @@ sub digestAdd sysseek($fh2, 0, 1), $eofPosn + length($data2))); return -112; } else { - &$Log(sprintf("digestAdd: $file truncated from %d to %d", + &$Log(sprintf("digestAdd: %s truncated from %d to %d", + $file, sysseek($fh2, 0, 1), $eofPosn + length($data2))); } } diff --git a/lib/BackupPC/Xfer/RsyncFileIO.pm b/lib/BackupPC/Xfer/RsyncFileIO.pm index 820f898..2829e79 100644 --- a/lib/BackupPC/Xfer/RsyncFileIO.pm +++ b/lib/BackupPC/Xfer/RsyncFileIO.pm @@ -61,7 +61,7 @@ sub new my $fio = bless { blockSize => 700, logLevel => 0, - digest => File::RsyncP::Digest->new($options->{protocol_version}), + digest => File::RsyncP::Digest->new(), checksumSeed => 0, attrib => {}, logHandler => \&logHandler, @@ -76,6 +76,7 @@ sub new %$options, }, $class; + $fio->{digest}->protocol($fio->{protocol_version}); $fio->{shareM} = $fio->{bpc}->fileNameEltMangle($fio->{share}); $fio->{outDir} = "$fio->{xfer}{outDir}/new/"; $fio->{outDirSh} = "$fio->{outDir}/$fio->{shareM}/"; @@ -474,6 +475,11 @@ sub attribWrite my($fio, $d) = @_; my($poolWrite); + # + # Don't write attributes on 2nd phase - they're already + # taken care of during the first phase. + # + return if ( $fio->{phase} > 0 ); if ( !defined($d) ) { # # flush all entries (in reverse order) @@ -517,7 +523,8 @@ sub attribWrite $fio->logFileAction("skip", { %{$fio->{viewCache}{$d}{$f}}, name => $name, - }) if ( $fio->{logLevel} >= 2 ); + }) if ( $fio->{logLevel} >= 2 + && $a->{type} == BPC_FTYPE_FILE ); } } elsif ( !$fio->{full} ) { ##print("Delete file $f\n"); @@ -883,7 +890,8 @@ sub fileDeltaRxNext if ( $fio->{logLevel} >= 9 ); $fio->{rxOutFile} = $rxOutFile; $fio->{rxOutFileRel} = $rxOutFileRel; - $fio->{rxDigest} = File::RsyncP::Digest->new($fio->{protocol_version}); + $fio->{rxDigest} = File::RsyncP::Digest->new(); + $fio->{rxDigest}->protocol($fio->{protocol_version}); $fio->{rxDigest}->add(pack("V", $fio->{checksumSeed})); } if ( defined($fio->{rxMatchBlk}) @@ -1041,6 +1049,7 @@ sub fileDeltaRxDone close($fio->{rxInFd}) if ( defined($fio->{rxInFd}) ); unlink("$fio->{outDirSh}RStmp") if ( -f "$fio->{outDirSh}RStmp" ); + $fio->{phase} = $phase; # # Check the final md4 digest @@ -1080,7 +1089,8 @@ sub fileDeltaRxDone # # Empty file; just create an empty file digest # - $fio->{rxDigest} = File::RsyncP::Digest->new($fio->{protocol_version}); + $fio->{rxDigest} = File::RsyncP::Digest->new(); + $fio->{rxDigest}->protocol($fio->{protocol_version}); $fio->{rxDigest}->add(pack("V", $fio->{checksumSeed})); $newDigest = $fio->{rxDigest}->digest; } diff --git a/makeDist b/makeDist index 2679947..a0e454f 100755 --- a/makeDist +++ b/makeDist @@ -138,6 +138,9 @@ $errCnt += CheckConfigParams("doc-src/BackupPC.pod", $ConfVars, 1); # $ConfVars->{BackupPCUser} = 2; $ConfVars->{CgiDir} = 2; +$ConfVars->{TopDir} = 2; +$ConfVars->{LogDir} = 2; +$ConfVars->{ConfDir} = 2; $ConfVars->{InstallDir} = 2; $ConfVars->{CgiImageDir} = 2; @@ -418,6 +421,7 @@ sub CheckLangUsage while ( ) { next if ( /^\s*#/ ); s/\$Lang->{([^}]*)}/$vars->{$1} = 1;/eg; + s/(text|comment)\s*=>\s*"(CfgEdit_.*)"/$vars->{$2} = 1;/eg; } close(F); } @@ -474,7 +478,11 @@ sub CheckLangTags my $t1 = LangTextStrip($v1->{val}); my $t2 = LangTextStrip($v2->{val}); if ( $t1 ne $t2 ) { - print("$v1->{var}: got en.pm $t1\nvs $lang $t2\n\n"); + my $i; + for ( $i = 0 ; $i < length($t1) ; $i++ ) { + last if ( substr($t1, 0, $i) ne substr($t2, 0, $i) ); + } + print("$v1->{var}: ($i) got en.pm $t1\nvs $lang $t2\n\n"); $errors++; } }
Totaux Fichiers existants