- various fixes to configure.pl and lib/BackupPC/Lib.pm
authorcbarratt <cbarratt>
Sun, 5 Feb 2006 18:46:43 +0000 (18:46 +0000)
committercbarratt <cbarratt>
Sun, 5 Feb 2006 18:46:43 +0000 (18:46 +0000)
 - 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.

20 files changed:
bin/BackupPC_attribPrint
bin/BackupPC_fixupBackupSummary
bin/BackupPC_tarPCCopy
conf/config.pl
configure.pl
lib/BackupPC/CGI/EditConfig.pm
lib/BackupPC/CGI/Lib.pm
lib/BackupPC/Config/Meta.pm
lib/BackupPC/Lang/de.pm
lib/BackupPC/Lang/en.pm
lib/BackupPC/Lang/es.pm
lib/BackupPC/Lang/fr.pm
lib/BackupPC/Lang/it.pm
lib/BackupPC/Lang/nl.pm
lib/BackupPC/Lang/pt_br.pm
lib/BackupPC/Lib.pm
lib/BackupPC/Storage/Text.pm
lib/BackupPC/Xfer/RsyncDigest.pm
lib/BackupPC/Xfer/RsyncFileIO.pm
makeDist

index c583654..9e02e5c 100755 (executable)
@@ -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.
 #
index 5bc5318..537bbc1 100755 (executable)
@@ -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.
 #
index a7b0e7a..f2d96b1 100755 (executable)
@@ -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.
 #
index d0fdc1f..e02fe27 100644 (file)
@@ -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,
index f20682a..d592b8f 100755 (executable)
@@ -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 <<EOF if ( !$opts{fhs} || !-f "/etc/BackupPC/config.pl" );
@@ -185,9 +186,12 @@ if ( $ConfigPath ne "" && -r $ConfigPath ) {
     %Conf = $bpc->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;
index 6633f59..11ac989 100644 (file)
@@ -28,7 +28,7 @@
 #
 #========================================================================
 #
-# Version 2.1.0beta2pl1, released 30 May 2004.
+# Version 3.0.0alpha, released 23 Jan 2006.
 #
 # See http://backuppc.sourceforge.net.
 #
@@ -1187,8 +1187,9 @@ EOF
                $varValue = [$varValue] if ( ref($varValue) ne "ARRAY" );
                $varValue = join(", ", @$varValue);
            }
+            my $textType = ($varName =~ /Passwd/) ? "password" : "text";
             $content .= <<EOF;
-<input type="text" name="v_z_$varName" size="$size" maxlength="256" value="${EscHTML($varValue)}"$onChange>
+<input type="$textType" name="v_z_$varName" size="$size" maxlength="256" value="${EscHTML($varValue)}"$onChange>
 EOF
         } elsif ( $type->{type} eq "boolean" ) {
             # checkbox
index bec4ea8..3c7c9bd 100644 (file)
@@ -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;
index 3001e45..280b67e 100644 (file)
@@ -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",
index e112b73..c7ff0cd 100644 (file)
@@ -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} = <<EOF;
+To add a new host, select Add and then enter the name.  To start with
+the per-host configuration from another host, enter the host name
+as NEWHOST=COPYHOST.  This will overwrite any existing per-host
+configuration for NEWHOST.  You can also do this for an existing
+host.  To delete a host, hit the Delete button.  For Add, Delete,
+and configuration copy, changes don't take effect until you select
+Save.  None of the deleted host's backups will be removed,
+so if you accidently delete a host, simply re-add it.  To completely
+remove a host's backups, you need to manually remove the files
+below \$topDir/pc/HOST
+EOF
+
+$Lang{CfgEdit_Header_Main} = <<EOF;
+\${h1("Main Configuration Editor")}
+EOF
+
+$Lang{CfgEdit_Header_Host} = <<EOF;
+\${h1("Host \$host Configuration Editor")}
+<p>
+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
index 7b351c3..8d6d123 100644 (file)
@@ -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";
 
index 2011795..4d53312 100644 (file)
@@ -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} = <<EOF;
+To add a new host, select Add and then enter the name.  To start with
+the per-host configuration from another host, enter the host name
+as NEWHOST=COPYHOST.  This will overwrite any existing per-host
+configuration for NEWHOST.  You can also do this for an existing
+host.  To delete a host, hit the Delete button.  For Add, Delete,
+and configuration copy, changes don't take effect until you select
+Save.  None of the deleted host's backups will be removed,
+so if you accidently delete a host, simply re-add it.  To completely
+remove a host's backups, you need to manually remove the files
+below \$topDir/pc/HOST
+EOF
+
+$Lang{CfgEdit_Header_Main} = <<EOF;
+\${h1("Main Configuration Editor")}
+EOF
 
+$Lang{CfgEdit_Header_Host} = <<EOF;
+\${h1("Host \$host Configuration Editor")}
+<p>
+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
index 8e93c32..856a45c 100644 (file)
@@ -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.
 </p>
-<table glass="tableStnd" border cellspacing="1" cellpadding="3" width="80%">
+<table class="tableStnd" border cellspacing="1" cellpadding="3" width="80%">
 <tr class="tableheader"><td colspan="2" bgcolor="#ffffff"></td>
     <td align="center" colspan="3"> Totaux </td>
     <td align="center" colspan="2"> Fichiers existants </td>
@@ -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} = <<EOF;
+To add a new host, select Add and then enter the name.  To start with
+the per-host configuration from another host, enter the host name
+as NEWHOST=COPYHOST.  This will overwrite any existing per-host
+configuration for NEWHOST.  You can also do this for an existing
+host.  To delete a host, hit the Delete button.  For Add, Delete,
+and configuration copy, changes don't take effect until you select
+Save.  None of the deleted host's backups will be removed,
+so if you accidently delete a host, simply re-add it.  To completely
+remove a host's backups, you need to manually remove the files
+below \$topDir/pc/HOST
+EOF
+
+$Lang{CfgEdit_Header_Main} = <<EOF;
+\${h1("Main Configuration Editor")}
+EOF
+
+$Lang{CfgEdit_Header_Host} = <<EOF;
+\${h1("Host \$host Configuration Editor")}
+<p>
+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
index 8927c72..4d30823 100644 (file)
@@ -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} = <<EOF;
+To add a new host, select Add and then enter the name.  To start with
+the per-host configuration from another host, enter the host name
+as NEWHOST=COPYHOST.  This will overwrite any existing per-host
+configuration for NEWHOST.  You can also do this for an existing
+host.  To delete a host, hit the Delete button.  For Add, Delete,
+and configuration copy, changes don't take effect until you select
+Save.  None of the deleted host's backups will be removed,
+so if you accidently delete a host, simply re-add it.  To completely
+remove a host's backups, you need to manually remove the files
+below \$topDir/pc/HOST
+EOF
+
+$Lang{CfgEdit_Header_Main} = <<EOF;
+\${h1("Main Configuration Editor")}
+EOF
+
+$Lang{CfgEdit_Header_Host} = <<EOF;
+\${h1("Host \$host Configuration Editor")}
+<p>
+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";
+
index 279a0d5..3c6f30e 100644 (file)
@@ -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} = <<EOF;
+To add a new host, select Add and then enter the name.  To start with
+the per-host configuration from another host, enter the host name
+as NEWHOST=COPYHOST.  This will overwrite any existing per-host
+configuration for NEWHOST.  You can also do this for an existing
+host.  To delete a host, hit the Delete button.  For Add, Delete,
+and configuration copy, changes don't take effect until you select
+Save.  None of the deleted host's backups will be removed,
+so if you accidently delete a host, simply re-add it.  To completely
+remove a host's backups, you need to manually remove the files
+below \$topDir/pc/HOST
+EOF
+
+$Lang{CfgEdit_Header_Main} = <<EOF;
+\${h1("Main Configuration Editor")}
+EOF
 
+$Lang{CfgEdit_Header_Host} = <<EOF;
+\${h1("Host \$host Configuration Editor")}
+<p>
+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
index bcaac03..2fbf854 100644 (file)
@@ -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} = <<EOF;
+To add a new host, select Add and then enter the name.  To start with
+the per-host configuration from another host, enter the host name
+as NEWHOST=COPYHOST.  This will overwrite any existing per-host
+configuration for NEWHOST.  You can also do this for an existing
+host.  To delete a host, hit the Delete button.  For Add, Delete,
+and configuration copy, changes don't take effect until you select
+Save.  None of the deleted host's backups will be removed,
+so if you accidently delete a host, simply re-add it.  To completely
+remove a host's backups, you need to manually remove the files
+below \$topDir/pc/HOST
+EOF
 
+$Lang{CfgEdit_Header_Main} = <<EOF;
+\${h1("Main Configuration Editor")}
+EOF
 
+$Lang{CfgEdit_Header_Host} = <<EOF;
+\${h1("Host \$host Configuration Editor")}
+<p>
+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
index 251f909..48c4766 100644 (file)
@@ -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 ( $@ );
index 18f5913..4213106 100644 (file)
@@ -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;
index 6126938..d20d671 100644 (file)
@@ -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)));
             }
         }
index 820f898..2829e79 100644 (file)
@@ -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;
            }
index 2679947..a0e454f 100755 (executable)
--- 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 ( <F> ) {
            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++;
            }
        }