From: cbarratt
Date: Sun, 9 Dec 2007 05:37:32 +0000 (+0000)
Subject: 3.1.0 changes:
X-Git-Tag: v3_1_0
X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=commitdiff_plain;h=fda25dc88a63ccac1c80efa2e4994bf0725ca9b7
3.1.0 changes:
* Fixed config editor bug for case where override is unchecked on
an array where the current array is shorter than the main config's
array.
* Fixed missing close quote in BackupPC_archiveHost reported by Franky
Van Liedekerke.
* Replaced "$BinDir/.." with $bpc->InstallDir() for path to BackupPC
docs, mentioned by Kenneth Porter.
* Moved default of $Conf{IncrLevels} from lib/BackupPC/Storage/Text.pm
to lib/BackupPC/Lib.pm (after the merge of the config files). This
fixes a bug that caused $Conf{IncrLevels} to get over-ridden if it
was only defined in the main config file. Reported by John Rouillard.
* Fixed the completion status message in BackupPC_dump so that missing
error counts appear as 0, rather than empty. Reported by Bill.
* Changed lib/BackupPC/Xfer/RsyncFileIO.pm to only increment the error
count when the md4 checksum fails on the second phase, not the first.
Reported by Adrian Bridgett.
* Updated a comment in config.pl about BackupPC_nightly, reported by
Dan Pritts.
* Modified lib/BackupPC/CGI/Restore.pm to ensure that the list of hosts
presented for direct restore do have direct restore enabled. Reported
by Stephen Joyce.
* Modified lib/BackupPC/CGI/RestoreFile.pm to replace \n with \r\n in
the restore http response headers. Patch submitted by Thomas Eckhardt.
---
diff --git a/ChangeLog b/ChangeLog
index aef9d68..2840ee2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,46 @@
# Version __VERSION__, __RELEASEDATE__
#------------------------------------------------------------------------
+#------------------------------------------------------------------------
+# Version 3.1.0, 25 Nov 2007
+#------------------------------------------------------------------------
+
+* Fixed config editor bug for case where override is unchecked on
+ an array where the current array is shorter than the main config's
+ array.
+
+* Fixed missing close quote in BackupPC_archiveHost reported by Franky
+ Van Liedekerke.
+
+* Replaced "$BinDir/.." with $bpc->InstallDir() for path to BackupPC
+ docs, mentioned by Kenneth Porter.
+
+* Moved default of $Conf{IncrLevels} from lib/BackupPC/Storage/Text.pm
+ to lib/BackupPC/Lib.pm (after the merge of the config files). This
+ fixes a bug that caused $Conf{IncrLevels} to get over-ridden if it
+ was only defined in the main config file. Reported by John Rouillard.
+
+* Fixed the completion status message in BackupPC_dump so that missing
+ error counts appear as 0, rather than empty. Reported by Bill.
+
+* Changed lib/BackupPC/Xfer/RsyncFileIO.pm to only increment the error
+ count when the md4 checksum fails on the second phase, not the first.
+ Reported by Adrian Bridgett.
+
+* Updated a comment in config.pl about BackupPC_nightly, reported by
+ Dan Pritts.
+
+* Modified lib/BackupPC/CGI/Restore.pm to ensure that the list of hosts
+ presented for direct restore do have direct restore enabled. Reported
+ by Stephen Joyce.
+
+* Modified lib/BackupPC/CGI/RestoreFile.pm to replace \n with \r\n in
+ the restore http response headers. Patch submitted by Thomas Eckhardt.
+
+#------------------------------------------------------------------------
+# Version 3.1.0beta1, 21 Oct 2007
+#------------------------------------------------------------------------
+
* When there is an existing partial, a new partials is only saved
if it has more files than the existing partial. Requested by
Carl Soderstrom.
diff --git a/bin/BackupPC b/bin/BackupPC
index 195e19b..d200f5a 100755
--- a/bin/BackupPC
+++ b/bin/BackupPC
@@ -47,7 +47,7 @@
#
#========================================================================
#
-# Version 3.1.0beta1, released 21 Oct 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_archive b/bin/BackupPC_archive
index 5cca3f3..7d38e81 100644
--- a/bin/BackupPC_archive
+++ b/bin/BackupPC_archive
@@ -29,7 +29,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_archiveHost b/bin/BackupPC_archiveHost
index 723c8b3..f5535f1 100755
--- a/bin/BackupPC_archiveHost
+++ b/bin/BackupPC_archiveHost
@@ -38,7 +38,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
@@ -106,7 +106,7 @@ if ( -x "/bin/csh" ) {
}
my $cmd = "$tarCreate -t -h $host -n $bkupNum -s $share . ";
$cmd .= "| $compPath " if ( $compPath ne "cat"
- && $compPath ne "/bin/cat
+ && $compPath ne "/bin/cat"
&& $compPath ne "" );
if ( -b $outLoc || -c $outLoc || -f $outLoc ) {
#
diff --git a/bin/BackupPC_archiveStart b/bin/BackupPC_archiveStart
index 09ed23e..c7c9255 100755
--- a/bin/BackupPC_archiveStart
+++ b/bin/BackupPC_archiveStart
@@ -35,7 +35,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_attribPrint b/bin/BackupPC_attribPrint
index 5fee85f..dce9a33 100755
--- a/bin/BackupPC_attribPrint
+++ b/bin/BackupPC_attribPrint
@@ -31,7 +31,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_compressPool b/bin/BackupPC_compressPool
index 8a3523c..e9845ef 100755
--- a/bin/BackupPC_compressPool
+++ b/bin/BackupPC_compressPool
@@ -49,7 +49,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_dump b/bin/BackupPC_dump
index 7c3e33c..b54c208 100755
--- a/bin/BackupPC_dump
+++ b/bin/BackupPC_dump
@@ -70,7 +70,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
@@ -987,6 +987,11 @@ my $newNum = BackupSave();
my $otherCount = $stat{xferErrCnt} - $stat{xferBadFileCnt}
- $stat{xferBadShareCnt};
+$stat{fileCnt} ||= 0;
+$stat{byteCnt} ||= 0;
+$stat{xferErrCnt} ||= 0;
+$stat{xferBadFileCnt} ||= 0;
+$stat{xferBadShareCnt} ||= 0;
print(LOG $bpc->timeStamp,
"$type backup $newNum complete, $stat{fileCnt} files,"
. " $stat{byteCnt} bytes,"
diff --git a/bin/BackupPC_fixupBackupSummary b/bin/BackupPC_fixupBackupSummary
index b9a00b6..dc9db98 100755
--- a/bin/BackupPC_fixupBackupSummary
+++ b/bin/BackupPC_fixupBackupSummary
@@ -30,7 +30,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_link b/bin/BackupPC_link
index 1793a0e..5a58ae4 100755
--- a/bin/BackupPC_link
+++ b/bin/BackupPC_link
@@ -39,7 +39,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_nightly b/bin/BackupPC_nightly
index 7bee23c..29b15e4 100755
--- a/bin/BackupPC_nightly
+++ b/bin/BackupPC_nightly
@@ -55,7 +55,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_restore b/bin/BackupPC_restore
index d25d0c6..f23afe8 100755
--- a/bin/BackupPC_restore
+++ b/bin/BackupPC_restore
@@ -29,7 +29,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_sendEmail b/bin/BackupPC_sendEmail
index 6a07aac..390093a 100755
--- a/bin/BackupPC_sendEmail
+++ b/bin/BackupPC_sendEmail
@@ -31,7 +31,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_serverMesg b/bin/BackupPC_serverMesg
index c40b581..10c8512 100755
--- a/bin/BackupPC_serverMesg
+++ b/bin/BackupPC_serverMesg
@@ -43,7 +43,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_tarCreate b/bin/BackupPC_tarCreate
index 6fe415f..4366a27 100755
--- a/bin/BackupPC_tarCreate
+++ b/bin/BackupPC_tarCreate
@@ -55,7 +55,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_tarExtract b/bin/BackupPC_tarExtract
index 6535c40..af9b298 100755
--- a/bin/BackupPC_tarExtract
+++ b/bin/BackupPC_tarExtract
@@ -27,7 +27,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_tarPCCopy b/bin/BackupPC_tarPCCopy
index 0f6f49c..342c141 100755
--- a/bin/BackupPC_tarPCCopy
+++ b/bin/BackupPC_tarPCCopy
@@ -38,7 +38,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_trashClean b/bin/BackupPC_trashClean
index 6ed2c28..80bcee3 100755
--- a/bin/BackupPC_trashClean
+++ b/bin/BackupPC_trashClean
@@ -29,7 +29,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_zcat b/bin/BackupPC_zcat
index 30a03c0..21e5b95 100755
--- a/bin/BackupPC_zcat
+++ b/bin/BackupPC_zcat
@@ -32,7 +32,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_zipCreate b/bin/BackupPC_zipCreate
index 354182c..dcd32fc 100755
--- a/bin/BackupPC_zipCreate
+++ b/bin/BackupPC_zipCreate
@@ -51,7 +51,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/cgi-bin/BackupPC_Admin b/cgi-bin/BackupPC_Admin
index fedd848..58d6f64 100755
--- a/cgi-bin/BackupPC_Admin
+++ b/cgi-bin/BackupPC_Admin
@@ -39,7 +39,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/conf/config.pl b/conf/config.pl
index 411138c..a807a79 100644
--- a/conf/config.pl
+++ b/conf/config.pl
@@ -144,8 +144,9 @@ $Conf{MaxPendingCmds} = 10;
# Each night, at the first wakeup listed in $Conf{WakeupSchedule},
# BackupPC_nightly is run. Its job is to remove unneeded files
# in the pool, ie: files that only have one link. To avoid race
-# conditions, BackupPC_nightly runs only when there are no backups
-# running, and no backups will start while it runs.
+# conditions, BackupPC_nightly and BackupPC_link cannot run at
+# the same time. Starting in v3.0.0, BackupPC_nightly can run
+# concurrently with backups (BackupPC_dump).
#
# So to reduce the elapsed time, you might want to increase this
# setting to run several BackupPC_nightly processes in parallel
diff --git a/lib/BackupPC/Attrib.pm b/lib/BackupPC/Attrib.pm
index 8b6cbc2..046cf87 100644
--- a/lib/BackupPC/Attrib.pm
+++ b/lib/BackupPC/Attrib.pm
@@ -30,7 +30,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/AdminOptions.pm b/lib/BackupPC/CGI/AdminOptions.pm
index f113610..cbce0cb 100644
--- a/lib/BackupPC/CGI/AdminOptions.pm
+++ b/lib/BackupPC/CGI/AdminOptions.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/Archive.pm b/lib/BackupPC/CGI/Archive.pm
index 5c8989a..603bdcc 100644
--- a/lib/BackupPC/CGI/Archive.pm
+++ b/lib/BackupPC/CGI/Archive.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/ArchiveInfo.pm b/lib/BackupPC/CGI/ArchiveInfo.pm
index 0b5a57f..0c24380 100644
--- a/lib/BackupPC/CGI/ArchiveInfo.pm
+++ b/lib/BackupPC/CGI/ArchiveInfo.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/Browse.pm b/lib/BackupPC/CGI/Browse.pm
index 2bbdeda..f39741d 100644
--- a/lib/BackupPC/CGI/Browse.pm
+++ b/lib/BackupPC/CGI/Browse.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/DirHistory.pm b/lib/BackupPC/CGI/DirHistory.pm
index 69516e2..b880c11 100644
--- a/lib/BackupPC/CGI/DirHistory.pm
+++ b/lib/BackupPC/CGI/DirHistory.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/EditConfig.pm b/lib/BackupPC/CGI/EditConfig.pm
index 0be716a..edc4526 100644
--- a/lib/BackupPC/CGI/EditConfig.pm
+++ b/lib/BackupPC/CGI/EditConfig.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
@@ -379,13 +379,17 @@ sub action
}
if ( (my $var = $In{overrideUncheck}) ne "" ) {
#
- # a compound variable was unchecked; delete extra
- # variables to make the shape the same.
+ # a compound variable was unchecked; delete or
+ # add extra variables to make the shape the same.
#
#print STDERR Dumper(\%In);
foreach my $v ( keys(%In) ) {
- next if ( $v !~ /^v_zZ_(\Q$var\E(_zZ_.*|$))/ );
- delete($In{$v}) if ( !defined($In{"orig_zZ_$1"}) );
+ if ( $v =~ /^v_zZ_(\Q$var\E(_zZ_.*|$))/ ) {
+ delete($In{$v}) if ( !defined($In{"orig_zZ_$1"}) );
+ }
+ if ( $v =~ /^orig_zZ_(\Q$var\E(_zZ_.*|$))/ ) {
+ $In{"v_zZ_$1"} = $In{$v};
+ }
}
delete($In{"vflds.$var"});
}
diff --git a/lib/BackupPC/CGI/EmailSummary.pm b/lib/BackupPC/CGI/EmailSummary.pm
index f72dc1a..aee7050 100644
--- a/lib/BackupPC/CGI/EmailSummary.pm
+++ b/lib/BackupPC/CGI/EmailSummary.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/GeneralInfo.pm b/lib/BackupPC/CGI/GeneralInfo.pm
index 3340fd5..2dade4e 100644
--- a/lib/BackupPC/CGI/GeneralInfo.pm
+++ b/lib/BackupPC/CGI/GeneralInfo.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/HostInfo.pm b/lib/BackupPC/CGI/HostInfo.pm
index e06b191..546beef 100644
--- a/lib/BackupPC/CGI/HostInfo.pm
+++ b/lib/BackupPC/CGI/HostInfo.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/LOGlist.pm b/lib/BackupPC/CGI/LOGlist.pm
index 16ce361..e8fdbb3 100644
--- a/lib/BackupPC/CGI/LOGlist.pm
+++ b/lib/BackupPC/CGI/LOGlist.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/Lib.pm b/lib/BackupPC/CGI/Lib.pm
index 0e249c0..216d70c 100644
--- a/lib/BackupPC/CGI/Lib.pm
+++ b/lib/BackupPC/CGI/Lib.pm
@@ -29,7 +29,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
@@ -105,6 +105,9 @@ sub NewRequest
umask($Conf{UmaskMode});
} elsif ( $bpc->ConfigMTime() != $ConfigMTime ) {
$bpc->ConfigRead();
+ $TopDir = $bpc->TopDir();
+ $LogDir = $bpc->LogDir();
+ $BinDir = $bpc->BinDir();
%Conf = $bpc->Conf();
$Lang = $bpc->Lang();
$ConfigMTime = $bpc->ConfigMTime();
diff --git a/lib/BackupPC/CGI/Queue.pm b/lib/BackupPC/CGI/Queue.pm
index 3949052..9ce71c7 100644
--- a/lib/BackupPC/CGI/Queue.pm
+++ b/lib/BackupPC/CGI/Queue.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/RSS.pm b/lib/BackupPC/CGI/RSS.pm
index 17345b3..2c63508 100644
--- a/lib/BackupPC/CGI/RSS.pm
+++ b/lib/BackupPC/CGI/RSS.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/ReloadServer.pm b/lib/BackupPC/CGI/ReloadServer.pm
index 34c1439..ffb9aaa 100644
--- a/lib/BackupPC/CGI/ReloadServer.pm
+++ b/lib/BackupPC/CGI/ReloadServer.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/Restore.pm b/lib/BackupPC/CGI/Restore.pm
index 318874a..6b8755c 100644
--- a/lib/BackupPC/CGI/Restore.pm
+++ b/lib/BackupPC/CGI/Restore.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
@@ -101,13 +101,38 @@ EOF
#
# Build list of hosts
#
- my $hostDestSel;
- my @hosts;
+ my($hostDestSel, @hosts, $gotThisHost, $directHost);
+
+ #
+ # Check all the hosts this user has permissions for
+ # and make sure direct restore is enabled.
+ # Note: after this loop we have the config for the
+ # last host in @hosts, not the original $In{host}!!
+ #
+ $directHost = $host;
foreach my $h ( GetUserHosts(1) ) {
- my $sel = " selected" if ( $h eq $In{host} );
- $hostDestSel .= "";
- push(@hosts, $h);
+ #
+ # Pick up the host's config file
+ #
+ $bpc->ConfigRead($h);
+ %Conf = $bpc->Conf();
+ my $cmd = $Conf{XferMethod} eq "smb" ? $Conf{SmbClientRestoreCmd}
+ : $Conf{XferMethod} eq "tar" ? $Conf{TarClientRestoreCmd}
+ : $Conf{XferMethod} eq "archive" ? undef
+ : $Conf{RsyncRestoreArgs};
+ if ( ref($cmd) eq "ARRAY" ? @$cmd : $cmd ne "" ) {
+ #
+ # Direct restore is enabled
+ #
+ push(@hosts, $h);
+ $gotThisHost = 1 if ( $h eq $host );
+ }
}
+ $directHost = $hosts[0] if ( !$gotThisHost && @hosts );
+ foreach my $h ( @hosts ) {
+ my $sel = " selected" if ( $h eq $directHost );
+ $hostDestSel .= "";
+ }
#
# Tell the user what options they have
@@ -116,27 +141,15 @@ EOF
$share = decode_utf8($share);
$content = eval("qq{$Lang->{Restore_Options_for__host2}}");
- if ( @hosts == 1 ) {
- #
- # Pick up the host's config file
- #
- $bpc->ConfigRead($hosts[0]);
- %Conf = $bpc->Conf();
- }
-
#
# Decide if option 1 (direct restore) is available based
# on whether the restore command is set.
#
- my $cmd = $Conf{XferMethod} eq "smb" ? $Conf{SmbClientRestoreCmd}
- : $Conf{XferMethod} eq "tar" ? $Conf{TarClientRestoreCmd}
- : $Conf{XferMethod} eq "archive" ? undef
- : $Conf{RsyncRestoreArgs};
- if ( defined($cmd) ) {
+ if ( $hostDestSel ne "" ) {
$content .= eval(
"qq{$Lang->{Restore_Options_for__host_Option1}}");
} else {
- my $hostDest = $hosts[0];
+ my $hostDest = $In{host};
$content .= eval(
"qq{$Lang->{Restore_Options_for__host_Option1_disabled}}");
}
diff --git a/lib/BackupPC/CGI/RestoreFile.pm b/lib/BackupPC/CGI/RestoreFile.pm
index 8c83640..aa44657 100644
--- a/lib/BackupPC/CGI/RestoreFile.pm
+++ b/lib/BackupPC/CGI/RestoreFile.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
@@ -183,8 +183,8 @@ sub restoreFile
my $fileName = $1 if ( $dir =~ /.*\/(.*)/ );
$fileName =~ s/"/\\"/g;
- print "Content-Type: $contentType\n";
- print "Content-Transfer-Encoding: binary\n";
+ print "Content-Type: $contentType\r\n";
+ print "Content-Transfer-Encoding: binary\r\n";
if ( $ENV{HTTP_USER_AGENT} =~ /\bmsie\b/i
&& $ENV{HTTP_USER_AGENT} !~ /\bopera\b/i ) {
@@ -196,7 +196,7 @@ sub restoreFile
from_to($fileName, "utf8", "cp1252")
if ( $Conf{ClientCharset} ne "" );
}
- print "Content-Disposition: attachment; filename=\"$fileName\"\n\n";
+ print "Content-Disposition: attachment; filename=\"$fileName\"\r\n\r\n";
while ( $f->read(\$data, 1024 * 1024) > 0 ) {
print STDOUT $data;
}
diff --git a/lib/BackupPC/CGI/RestoreInfo.pm b/lib/BackupPC/CGI/RestoreInfo.pm
index 0f86b09..23fd1dc 100644
--- a/lib/BackupPC/CGI/RestoreInfo.pm
+++ b/lib/BackupPC/CGI/RestoreInfo.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/StartServer.pm b/lib/BackupPC/CGI/StartServer.pm
index 9c60e95..7128f2c 100644
--- a/lib/BackupPC/CGI/StartServer.pm
+++ b/lib/BackupPC/CGI/StartServer.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/StartStopBackup.pm b/lib/BackupPC/CGI/StartStopBackup.pm
index e3094a4..3ab2bfe 100644
--- a/lib/BackupPC/CGI/StartStopBackup.pm
+++ b/lib/BackupPC/CGI/StartStopBackup.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/StopServer.pm b/lib/BackupPC/CGI/StopServer.pm
index 88f8de8..ae80b5a 100644
--- a/lib/BackupPC/CGI/StopServer.pm
+++ b/lib/BackupPC/CGI/StopServer.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/Summary.pm b/lib/BackupPC/CGI/Summary.pm
index f818fdf..4406081 100644
--- a/lib/BackupPC/CGI/Summary.pm
+++ b/lib/BackupPC/CGI/Summary.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/View.pm b/lib/BackupPC/CGI/View.pm
index efb5e1c..0247068 100644
--- a/lib/BackupPC/CGI/View.pm
+++ b/lib/BackupPC/CGI/View.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
@@ -86,7 +86,7 @@ sub action
$file = $bpc->ConfDir() . "/hosts";
$linkHosts = 1;
} elsif ( $type eq "docs" ) {
- $file = "$BinDir/../doc/BackupPC.html";
+ $file = $bpc->InstallDir() . "/doc/BackupPC.html";
} elsif ( $host ne "" ) {
if ( !defined($In{num}) ) {
# get the latest LOG file
diff --git a/lib/BackupPC/Config/Meta.pm b/lib/BackupPC/Config/Meta.pm
index a4f54c2..133ddd0 100644
--- a/lib/BackupPC/Config/Meta.pm
+++ b/lib/BackupPC/Config/Meta.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 3.1.0beta1, released 23 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/FileZIO.pm b/lib/BackupPC/FileZIO.pm
index ab89710..0bbb6e9 100644
--- a/lib/BackupPC/FileZIO.pm
+++ b/lib/BackupPC/FileZIO.pm
@@ -29,7 +29,7 @@
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.1.0, released 25 Nov 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/Lang/de.pm b/lib/BackupPC/Lang/de.pm
index 2d74daa..06a1b6b 100644
--- a/lib/BackupPC/Lang/de.pm
+++ b/lib/BackupPC/Lang/de.pm
@@ -465,7 +465,7 @@ Bitte w
EOF
$Lang{Restore_Options_for__host_Option1} = <\$directHost wiederherzustellen.
Alternativ können Sie einen anderen Computer und/oder Freigabe als Ziel angeben.
Warnung: alle aktuell existierenden Dateien/Verzeichnisse, die bereits vorhanden sind,
diff --git a/lib/BackupPC/Lang/en.pm b/lib/BackupPC/Lang/en.pm
index ba40885..1b72d71 100644
--- a/lib/BackupPC/Lang/en.pm
+++ b/lib/BackupPC/Lang/en.pm
@@ -456,7 +456,7 @@ EOF
$Lang{Restore_Options_for__host_Option1} = <\$directHost.
Warning: any existing files that match the ones you have
selected will be overwritten!
diff --git a/lib/BackupPC/Lang/es.pm b/lib/BackupPC/Lang/es.pm
index 67d2788..63cd9c2 100644
--- a/lib/BackupPC/Lang/es.pm
+++ b/lib/BackupPC/Lang/es.pm
@@ -457,7 +457,7 @@ EOF
$Lang{Restore_Options_for__host_Option1} = <\$directHost.
¡Atención!: ¡Cualquier archivo existente con el mismo nombre que los que ha
seleccionado será sobreescrito!
diff --git a/lib/BackupPC/Lang/fr.pm b/lib/BackupPC/Lang/fr.pm
index af324a9..9b9b609 100644
--- a/lib/BackupPC/Lang/fr.pm
+++ b/lib/BackupPC/Lang/fr.pm
@@ -456,7 +456,7 @@ EOF
$Lang{Restore_Options_for__host_Option1} = <\$directHost.
Attention:
tous les fichiers correspondant à ceux que vous avez sélectionnés vont être écrasés !
diff --git a/lib/BackupPC/Lang/it.pm b/lib/BackupPC/Lang/it.pm
index 6a54294..d26dcf4 100644
--- a/lib/BackupPC/Lang/it.pm
+++ b/lib/BackupPC/Lang/it.pm
@@ -466,7 +466,7 @@ EOF
$Lang{Restore_Options_for__host_Option1} = <\$directHost.
Attenzione: ogni file esistente che corrisponde ai file selezionati
sarà sovrascritto!
diff --git a/lib/BackupPC/Lang/nl.pm b/lib/BackupPC/Lang/nl.pm
index e690c8b..36adada 100644
--- a/lib/BackupPC/Lang/nl.pm
+++ b/lib/BackupPC/Lang/nl.pm
@@ -457,7 +457,7 @@ EOF
$Lang{Restore_Options_for__host_Option1} = <\$directHost.
Waarschuwing: bestaande bestanden met dezelfde naam zullen
overschreven worden!
diff --git a/lib/BackupPC/Lang/pl.pm b/lib/BackupPC/Lang/pl.pm
index ac015c7..b4cec29 100644
--- a/lib/BackupPC/Lang/pl.pm
+++ b/lib/BackupPC/Lang/pl.pm
@@ -456,7 +456,7 @@ EOF
$Lang{Restore_Options_for__host_Option1} = <\$directHost.
Atenção!: Qualquer arquivo existente com o mesmo nome que o que está
selecionado será sobrescrito!
diff --git a/lib/BackupPC/Lang/zh_CN.pm b/lib/BackupPC/Lang/zh_CN.pm
index a7e6a77..62aedb1 100644
--- a/lib/BackupPC/Lang/zh_CN.pm
+++ b/lib/BackupPC/Lang/zh_CN.pm
@@ -452,7 +452,7 @@ $Lang{Restore_Options_for__host2} = <\$directHost ä¸ã