# Version __VERSION__, __RELEASEDATE__
#------------------------------------------------------------------------
+* Config Editor "Save" button is now always visible, but greyed out
+ until there are changes to save.
+
+* Config editor allows other tabs to be selected when there is an
+ error, which allows you to fix an error (eg: missing binary) in
+ an exiting config file. Errors are now displayed at the top of
+ the page in addition to next to the erroneous setting.
+
* configure.pl checks version of Encode.pm. Reported by Chris Stone.
* Several fixes to bin/BackupPC_fixupBackupSummary from Stian Jordet.
+* Fixed config.pl editor writing to solve bug with multi-line text
+ strings ending in newline. Reported and root caused by Les Stott
+ and Jerry Groendyke.
+
+* Fixed error recovery case in BackupPC::PoolWrite, reported by
+ Samuel Bancal.
+
* Fixed table width in backup browsing to avoid Firefox layout anomoly,
provided by Jono Woodhouse.
-* CSS file updates from Jono Woodhouse. Priod (v2) version is included
+* CSS file updates from Jono Woodhouse. Prior (v2) version is included
as BackupPC_stnd_orig.css in case people prefer the old skin.
* More compact host summary, including disabled host indication,
from Jono Woodhouse.
+* New directory/file/hardlink and symlink image icons from Jono
+ Woodhouse, making directory browse more compact.
+
* BackupPC.pid is now world readable, suggested by Casper Thomsen.
+* Reordered the Server navigation bar links, suggested by David Relson.
+
+* Fixed typos in init.d/src/gentoo-backuppc, configure.pl and config.pl
+ reported by David Relson.
+
#------------------------------------------------------------------------
# Version 3.0.0beta1, 30 Jul 2006
#------------------------------------------------------------------------
* Added some CGI utf8 conversions from Rodrigo Real and Vincent
Fleuranceau.
+* Rsync transfers now correctly handle file names with \n or \r.
+
* Host name is forced to lower case, to match 2.x.
* Fixed LOG file naming in BackupPC_restore and BackupPC_archive.
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
/*
* BackupPC standard CSS definitions
*
- * Version 3.0.0beta1, released 30 Jul 2006.
+ * Version 3.0.0beta2, released 31 Oct 2006.
*
* See http://backuppc.sourceforge.net.
*
table {
border-collapse: collapse;
color: #000000;
- padding:0px;
+ padding: 2px;
}
h1 {
}
.editSaveButton {
- color:#ff0000;
+ color:#c0c0c0;
font-size:14pt;
font-weight:bold;
}
}
.fviewborder {
+ border-left:1px solid #666666;
border-bottom:1px solid #000000;
- border-left:1px dotted #666666;
+ border-right:1px solid #666666;
background-color:#eeeeee;
font-size:9pt;
}
.histView {
border-bottom:1px solid #000000;
- border-left:2px solid #ffffff;
+ border-left:1px solid #000000;
background-color:#eeeeee;
font-size:10pt;
}
.histViewMis {
border-bottom:1px solid #000000;
+ border-left:1px solid #000000;
background-color:#ffdddd;
}
#Content {
float:right;
- width:80%;
+ width:79%;
left:20%;
top:10px;
+ right:10px;
position:absolute;
}
#
# When rsync checksum caching is enabled (by adding the
# --checksum-seed=32761 option to $Conf{RsyncArgs}), the cached
-# checksums can be occaisonally verified to make sure the file
+# checksums can be occasionally verified to make sure the file
# contents matches the cached checksums. This is to avoid the
# risk that disk problems might cause the pool file contents to
# get corrupted, but the cached checksums would make BackupPC
'--recursive',
#
- # If you are using a patched client rsync that supports the
- # --checksum-seed option (see http://backuppc.sourceforge.net),
- # then uncomment this to enabled rsync checksum cachcing
+ # Rsync >= 2.6.3 supports the --checksum-seed option
+ # which allows rsync checksum caching on the server.
+ # Uncomment this to enable rsync checksum caching if
+ # you have a recent client rsync version and you want
+ # to enable checksum caching.
#
#'--checksum-seed=32761',
'--recursive',
#
- # If you are using a patched client rsync that supports the
- # --checksum-seed option (see http://backuppc.sourceforge.net),
- # then uncomment this to enabled rsync checksum cachcing
+ # Rsync >= 2.6.3 supports the --checksum-seed option
+ # which allows rsync checksum caching on the server.
+ # Uncomment this to enable rsync checksum caching if
+ # you have a recent client rsync version and you want
+ # to enable checksum caching.
#
#'--checksum-seed=32761',
print <<EOF;
-Please specify a data directory for BackupPC. This is where the
-all the PC backup data is stored. This file system needs to be
-big enough to accommodate all the PCs you expect to backup (eg:
-at least several GB per machine).
+Please specify a data directory for BackupPC. This is where all the
+PC backup data is stored. This file system needs to be big enough to
+accommodate all the PCs you expect to backup (eg: at least several GB
+per machine).
EOF
share ("/"), it is easier to restore a single file system if you backup
each file system separately. To do this you should list each file system
mount point in $Conf{TarShareName} or $Conf{RsyncShareName}, and add the
---one-file-system option to $Conf{TarClientCmd} or add --one-file-system
-(note the different punctuation) to $Conf{RsyncArgs}. In this case there
-is no need to exclude /proc explicitly since it looks like a different
-file system.
+--one-file-system option to $Conf{TarClientCmd} or $Conf{RsyncArgs}.
+In this case there is no need to exclude /proc explicitly since it looks
+like a different file system.
Next you should decide whether to run tar over ssh, rsh or nfs. Ssh is
the preferred method. Rsh is not secure and therefore not recommended.
digit is for significant feature releases and improvements (most of
the releases have been in this category), and the last digit is for
bug fixes. You should think of the old 1.00, 1.01, 1.02 and 1.03 as
-1..0, 1.1.0, 1.2.0 and 1.3.0.
+1.0.0, 1.1.0, 1.2.0 and 1.3.0.
Additionally, patches might be made available. A patched version
number is of the form X.Y.ZplN (eg: 2.1.0pl2), where N is the
checkconfig() {
if [ ! -f ${CONF_FILE} ] ; then
- eeror "No ${CONF_FILE} exists!"
+ eerror "No ${CONF_FILE} exists!"
fi
}
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
$a->{type});
my $modeStr = sprintf("0%o", $a->{mode} & 07777);
$iconStr = <<EOF;
-<img src="$Conf{CgiImageDirURL}/icon-$typeStr.gif" align="center">
+<img src="$Conf{CgiImageDirURL}/icon-$typeStr.png" valign="top">
EOF
$attrStr .= <<EOF;
<td align="center" class="fviewborder">$typeStr</td>
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
ErrorExit(eval("qq{$Lang->{Only_privileged_users_can_edit_config_files}}"));
}
- if ( defined($In{menu}) || $In{editAction} eq $Lang->{CfgEdit_Button_Save} ) {
+ if ( defined($In{menu}) || $In{saveAction} eq "Save" ) {
$errors = errorCheck();
if ( %$errors ) {
#
# If there are errors, then go back to the same menu
#
- $In{editAction} = "";
- $In{newMenu} = "";
+ $In{saveAction} = "";
+ #$In{newMenu} = "";
}
if ( (my $var = $In{overrideUncheck}) ne "" ) {
#
$newConf = { %$mainConf, %$hostConf };
}
- if ( $In{editAction} ne $Lang->{CfgEdit_Button_Save} && $In{newMenu} ne ""
+ if ( $In{saveAction} ne "Save" && $In{newMenu} ne ""
&& defined($ConfigMenu{$In{newMenu}}) ) {
$menu = $In{newMenu};
}
$content .= eval("qq($Lang->{CfgEdit_Header_Host})");
}
- my $saveDisplay = "block";
- $saveDisplay = "none" if ( !$In{modified}
- || $In{editAction} eq $Lang->{CfgEdit_Button_Save} );
+ my $saveStyle = "";
+ my $saveColor = "#ff0000";
+
+ if ( $In{modified} && $In{saveAction} ne "Save" && !%$errors ) {
+ $saveStyle = "style=\"color:$saveColor\"";
+ } else {
+ $In{modified} = 0;
+ }
+
#
# Add action and host to the URL so the nav bar link is
# highlighted
<table border="0" cellpadding="2">
<tr>$groupText</tr>
<tr>
-<form method="post" name="form1" action="$url">
+<form method="post" name="editForm" action="$url">
<input type="hidden" name="host" value="$host">
<input type="hidden" name="menu" value="$menu">
<input type="hidden" name="newMenu" value="">
<input type="hidden" name="overrideUncheck" value="">
<input type="hidden" name="addVar" value="">
<input type="hidden" name="action" value="editConfig">
-<input type="submit" class="editSaveButton" style="display: $saveDisplay" name="editAction" value="${EscHTML($Lang->{CfgEdit_Button_Save})}">
+<input type="hidden" name="saveAction" value="">
+<input type="button" class="editSaveButton" name="editAction"
+ value="${EscHTML($Lang->{CfgEdit_Button_Save})}" $saveStyle
+ onClick="saveSubmit();">
+<p>
<script language="javascript" type="text/javascript">
<!--
+ function saveSubmit()
+ {
+ if ( document.editForm.modified.value != 0 ) {
+ document.editForm.saveAction.value = 'Save';
+ document.editForm.submit();
+ }
+ return false;
+ }
+
function deleteSubmit(varName)
{
- document.form1.deleteVar.value = varName;
- document.form1.modified.value = 1;
- document.form1.submit();
+ document.editForm.deleteVar.value = varName;
+ document.editForm.modified.value = 1;
+ document.editForm.submit();
return;
}
function insertSubmit(varName)
{
- document.form1.insertVar.value = varName;
- document.form1.modified.value = 1;
- document.form1.submit();
+ document.editForm.insertVar.value = varName;
+ document.editForm.modified.value = 1;
+ document.editForm.submit();
return;
}
function addSubmit(varName, checkKey)
{
if ( checkKey
- && eval("document.form1.addVarKey_" + varName + ".value") == "" ) {
+ && eval("document.editForm.addVarKey_" + varName + ".value") == "" ) {
alert("New key must be non-empty");
return;
}
- document.form1.addVar.value = varName;
- document.form1.modified.value = 1;
- document.form1.submit();
+ document.editForm.addVar.value = varName;
+ document.editForm.modified.value = 1;
+ document.editForm.submit();
return;
}
function menuSubmit(menuName)
{
- document.form1.newMenu.value = menuName;
- document.form1.submit();
+ document.editForm.newMenu.value = menuName;
+ document.editForm.submit();
}
function varChange(varName)
{
- document.form1.editAction.style.display = "block";
- document.form1.modified.value = 1;
+ document.editForm.modified.value = 1;
+ document.editForm.editAction.style.color = '$saveColor';
}
function checkboxChange(varName)
{
- document.form1.editAction.style.display = "block";
- document.form1.modified.value = 1;
+ document.editForm.modified.value = 1;
+ document.editForm.editAction.style.color = '$saveColor';
// Do nothing if the checkbox is now set
- if ( eval("document.form1.override_" + varName + ".checked") ) {
+ if ( eval("document.editForm.override_" + varName + ".checked") ) {
return false;
}
var allVars = {};
var varRE = new RegExp("^v_z_(" + varName + ".*)");
var origRE = new RegExp("^orig_z_(" + varName + ".*)");
- for ( var i = 0 ; i < document.form1.elements.length ; i++ ) {
- var e = document.form1.elements[i];
+ for ( var i = 0 ; i < document.editForm.elements.length ; i++ ) {
+ var e = document.editForm.elements[i];
var re;
if ( (re = varRE.exec(e.name)) != null ) {
if ( allVars[re[1]] == null ) {
} else {
// copy the original variable values
//debugMsg("setting " + v);
- eval("document.form1.v_z_" + v + ".value = document.form1.orig_z_" + v + ".value");
+ eval("document.editForm.v_z_" + v + ".value = document.editForm.orig_z_" + v + ".value");
}
}
if ( sameShape ) {
} else {
// need to rebuild the form since the compound variable
// has changed shape
- document.form1.overrideUncheck.value = varName;
- document.form1.submit();
+ document.editForm.overrideUncheck.value = varName;
+ document.editForm.submit();
return false;
}
}
function checkboxSet(varName)
{
- document.form1.editAction.style.display = "block";
- document.form1.modified.value = 1;
- eval("document.form1.override_" + varName + ".checked = 1;");
+ document.editForm.modified.value = 1;
+ document.editForm.editAction.style.color = '$saveColor';
+ eval("document.editForm.override_" + varName + ".checked = 1;");
return false;
}
EOF
my $doneParam = {};
+ my $tblContent;
#
# There is a special case of the user deleting just the field
my $isError = %$errors;
- if ( !$isError && $In{editAction} eq $Lang->{CfgEdit_Button_Save} ) {
+ if ( !$isError && $In{saveAction} eq "Save" ) {
my($mesg, $err);
if ( $host ne "" ) {
$hostConf = $bpc->ConfigDataRead($host) if ( !defined($hostConf) );
$newConf->{Hosts} = $hostsSave;
}
if ( defined($err) ) {
- $content .= <<EOF;
+ $tblContent .= <<EOF;
<tr><td colspan="2" class="border"><span class="editError">$err</span></td></tr>
EOF
}
if ( $mesg ne "" ) {
(my $mesgBR = $mesg) =~ s/\n/<br>\n/g;
# uncomment this if you want the changes to be displayed
-# $content .= <<EOF;
+# $tblContent .= <<EOF;
#<tr><td colspan="2" class="border"><span class="editComment">$mesgBR</span></td></tr>
#EOF
foreach my $str ( split(/\n/, $mesg) ) {
if ( defined($paramInfo->{text}) ) {
my $text = eval("qq($Lang->{$paramInfo->{text}})");
- $content .= <<EOF;
+ $tblContent .= <<EOF;
<tr><td colspan="2" class="editHeader">$text</td></tr>
EOF
next;
$doneParam->{$param} = 1;
- $content .= fieldEditBuild($ConfigMeta{$param},
+ $tblContent .= fieldEditBuild($ConfigMeta{$param},
$param,
$newConf->{$param},
$errors,
if ( defined($paramInfo->{comment}) ) {
my $topDir = $bpc->TopDir;
my $text = eval("qq($Lang->{$paramInfo->{comment}})");
- $content .= <<EOF;
+ $tblContent .= <<EOF;
<tr><td colspan="2" class="editComment">$text</td></tr>
EOF
}
}
#
- # Emit any remaining errors - should not happen
+ # Emit a summary of all the errors
#
+ my $errorTxt;
+
+ if ( %$errors ) {
+ $errorTxt .= <<EOF;
+<tr><td colspan="2" class="border"><span class="editError">$Lang->{CfgEdit_Error_No_Save}</span></td></tr>
+EOF
+ }
+
foreach my $param ( sort(keys(%$errors)) ) {
- $content .= <<EOF;
+ $errorTxt .= <<EOF;
<tr><td colspan="2" class="border"><span class="editError">$errors->{$param}</span></td></tr>
EOF
- delete($errors->{$param});
}
$content .= <<EOF;
+$errorTxt
+$tblContent
</table>
EOF
$doneParam->{$param} = 1;
}
- if ( defined($In{menu}) || $In{editAction} eq $Lang->{CfgEdit_Button_Save} ) {
- if ( $In{editAction} eq $Lang->{CfgEdit_Button_Save}
- && !$userHost ) {
+ if ( defined($In{menu}) || $In{saveAction} eq "Save" ) {
+ if ( $In{saveAction} eq "Save" && !$userHost ) {
#
# Emit the new settings as orig_z_ parameters
#
$In{addVar} = "";
}
$content .= "<table border=\"1\" cellspacing=\"0\">\n";
+ my $colspan;
if ( ref($type) eq "HASH" && ref($type->{child}) eq "HASH"
&& $type->{child}{type} eq "horizHash" ) {
}
$content .= "<tr><td class=\"border\"></td>\n";
for ( my $i = 0 ; $i < @order ; $i++ ) {
- $content .= "<td class=\"border\">$order[$i]</td>\n";
+ $content .= "<td class=\"tableheader\">$order[$i]</td>\n";
}
+ $colspan = @order + 1;
$content .= "</tr>\n";
for ( my $i = 0 ; $i < @$varValue ; $i++ ) {
if ( @$varValue > 1 || $type->{emptyOk} ) {
$overrideVar, $overrideSet);
$content .= "</tr>\n";
}
+ $colspan = 2;
}
$content .= <<EOF;
-<tr><td class="border"><input type="button" name="add_$varName" value="${EscHTML($Lang->{CfgEdit_Button_Add})}"
+<tr><td class="border" colspan="$colspan"><input type="button" name="add_$varName" value="${EscHTML($Lang->{CfgEdit_Button_Add})}"
onClick="addSubmit('$varName')"></td></tr>
</table>
EOF
$content .= <<EOF;
<span class="editError">$errors->{$varName}</span><br>
EOF
- delete($errors->{$varName});
}
my $onChange;
if ( defined($overrideVar) ) {
$onChange .= "varChange('$overrideVar');";
}
if ( $onchangeSubmit ) {
- $onChange .= "document.form1.submit();";
+ $onChange .= "document.editForm.submit();";
}
if ( $onChange ne "" ) {
$onChange = " onChange=\"$onChange\"";
return 1;
}
+ my $v = $In{"v_z_$varName"};
+
if ( $type->{type} eq "integer" ) {
- $$value = 0 + $In{"v_z_$varName"};
+ if ( $v =~ /^-?\d+\s*$/s || $v eq "" ) {
+ $$value = 0 + $v;
+ } else {
+ # error value - keep in string form
+ $$value = $v;
+ }
} elsif ( $type->{type} eq "float" ) {
- $$value = 0 + $In{"v_z_$varName"};
+ if ( $v =~ /^-?\d*(\.\d*)?\s*$/s || $v eq "" ) {
+ $$value = 0 + $v;
+ } else {
+ # error value - keep in string form
+ $$value = $v;
+ }
} elsif ( $type->{type} eq "shortlist" ) {
- $$value = [split(/[,\s]+/, $In{"v_z_$varName"})];
- if ( $type->{child} eq "float"
- || $type->{child} eq "integer"
- || $type->{child} eq "boolean" ) {
+ $$value = [split(/[,\s]+/, $v)];
+ if ( $type->{child} eq "float" ) {
+ foreach ( @$$value ) {
+ if ( /^-?\d*(\.\d*)?\s*$/s || $v eq "" ) {
+ $_ += 0;
+ }
+ }
+ } elsif ( $type->{child} eq "integer"
+ || $type->{child} eq "boolean" ) {
foreach ( @$$value ) {
- $_ += 0;
+ if ( /^-?\d+\s*$/s || $v eq "" ) {
+ $_ += 0;
+ }
}
}
} else {
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
my($title, $content, $noBrowse, $contentSub, $contentPost) = @_;
my @adminLinks = (
{ link => "", name => $Lang->{Status}},
- { link => "?action=adminOpts", name => $Lang->{Admin_Options},
- priv => 1},
+ { link => "?action=summary", name => $Lang->{PC_Summary}},
{ link => "?action=editConfig", name => $Lang->{CfgEdit_Edit_Config},
priv => 1},
{ link => "?action=editConfig&newMenu=hosts",
name => $Lang->{CfgEdit_Edit_Hosts},
priv => 1},
- { link => "?action=summary", name => $Lang->{PC_Summary}},
+ { link => "?action=adminOpts", name => $Lang->{Admin_Options},
+ priv => 1},
{ link => "?action=view&type=LOG", name => $Lang->{LOG_file},
priv => 1},
{ link => "?action=LOGlist", name => $Lang->{Old_LOGs},
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
},
SmbShareUserName => "string",
SmbSharePasswd => "string",
- SmbClientPath => {type => "string", undefIfEmpty => 1},
+ SmbClientPath => {type => "execPath", undefIfEmpty => 1},
SmbClientFullCmd => "string",
SmbClientIncrCmd => "string",
SmbClientRestoreCmd => "string",
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
<input type="hidden" name="type" value="3">
\$hiddenStr
<input type="hidden" value="\$In{action}" name="action">
-<table border="0">
+<table class="tableStnd" border="0">
<tr>
<td>Restore auf Computer</td>
<td><!--<input type="text" size="40" value="\${EscHTML(\$host)}"
Die folgenden Dateien werden auf die Freigabe \$In{shareDest} wiederhergestellt, von
dem Backup mit der Nummer \$num:
<p>
-<table border>
-<tr><td>Original Datei/Verzeichnis:</td><td>Wird wiederhergestellt nach:</td></tr>
+<table class="tableStnd" border>
+<tr class="tableheader"><td>Original Datei/Verzeichnis:</td><td>Wird wiederhergestellt nach:</td></tr>
\$fileListStr
</table>
</td><td width="3%">
</td><td valign="top">
<br>
- <table border="0" width="100%" align="left" cellpadding="3" cellspacing="1">
+ <table border width="100%" align="left" cellpadding="3" cellspacing="1">
\$fileHeader
\$topCheckAll
\$fileStr
\${h2("Historie von \${EscHTML(\$dirDisplay)}")}
<br>
-<table cellspacing="2" cellpadding="3">
+<table border cellspacing="2" cellpadding="3">
<tr class="fviewheader"><td>Datensicherungnummer</td>\$backupNumStr</tr>
<tr class="fviewheader"><td>Sicherungszeitpunkt</td>\$backupTimeStr</tr>
\$fileStr
$Lang{howLong_not_been_backed_up_for_days_days} = "kein Backup seit \$days Tagen";
#######################################################################
-# RSS strings (all ENGLISH currently)
+# RSS strings
#######################################################################
$Lang{RSS_Doc_Title} = "BackupPC Server";
$Lang{RSS_Doc_Description} = "RSS Feed für BackupPC";
EOF
#######################################################################
-# Configuration editor strings (all ENGLISH currently)
+# Configuration editor strings
#######################################################################
$Lang{Only_privileged_users_can_edit_config_files} = "Nur privilegierte Nutzer können die Administrationsoptionen ändern.";
\${h1("Host \$host Konfigurationseditor")}
<p>
Beachte: Wähle Überschreiben, wenn du einen host spezifischen Wert verändern willst
+<p>
EOF
$Lang{CfgEdit_Button_Save} = "Speichern";
$Lang{CfgEdit_Button_Override} = "Überschreiben";
$Lang{CfgEdit_Button_New_Key} = "Neuer Schlüssel";
+$Lang{CfgEdit_Error_No_Save}
+ = "ENG Error: No save due to errors";
$Lang{CfgEdit_Error__must_be_an_integer}
= "Error: \$var muss eine Zahl sein";
$Lang{CfgEdit_Error__must_be_real_valued_number}
<input type="hidden" name="type" value="3">
\$hiddenStr
<input type="hidden" value="\$In{action}" name="action">
-<table border="0">
+<table class="tableStnd" border="0">
<tr>
<td>Restore the files to host</td>
<td><!--<input type="text" size="40" value="\${EscHTML(\$host)}"
The following files will be restored to share \$In{shareDest}, from
backup number \$num:
<p>
-<table border>
-<tr><td>Original file/dir</td><td>Will be restored to</td></tr>
+<table class="tableStnd" border>
+<tr class="tableheader"><td>Original file/dir</td><td>Will be restored to</td></tr>
\$fileListStr
</table>
</td><td width="3%">
</td><td valign="top">
<br>
- <table border="0" width="100%" align="left" cellpadding="3" cellspacing="1">
+ <table border width="100%" align="left" cellpadding="3" cellspacing="1">
\$fileHeader
\$topCheckAll
\$fileStr
\${h2("History of \${EscHTML(\$dirDisplay)}")}
<br>
-<table cellspacing="2" cellpadding="3">
+<table border cellspacing="2" cellpadding="3">
<tr class="fviewheader"><td>Backup number</td>\$backupNumStr</tr>
<tr class="fviewheader"><td>Backup time</td>\$backupTimeStr</tr>
\$fileStr
\${h1("Host \$host Configuration Editor")}
<p>
Note: Check Override if you want to modify a value specific to this host.
+<p>
EOF
$Lang{CfgEdit_Button_Save} = "Save";
$Lang{CfgEdit_Button_Override} = "Override";
$Lang{CfgEdit_Button_New_Key} = "New Key";
+$Lang{CfgEdit_Error_No_Save}
+ = "Error: No save due to errors";
$Lang{CfgEdit_Error__must_be_an_integer}
= "Error: \$var must be an integer";
$Lang{CfgEdit_Error__must_be_real_valued_number}
<input type="hidden" name="type" value="3">
\$hiddenStr
<input type="hidden" value="\$In{action}" name="action">
-<table border="0">
+<table class="tableStnd" border="0">
<tr>
<td>Restaurar los archivos al host</td>
<td><!--<input type="text" size="40" value="\${EscHTML(\$host)}"
Los siguientes archivos serán restaurados en la unidad \$In{shareDest}, de
la copia de seguridad número \$num:
<p>
-<table border>
-<tr><td>Archivo/Dir Original </td><td>Será restaurado a</td></tr>
+<table class="tableStnd" border>
+<tr class="tableheader"><td>Archivo/Dir Original </td><td>Será restaurado a</td></tr>
\$fileListStr
</table>
</td><td width="3%">
</td><td valign="top">
<br>
- <table border="0" width="100%" align="left" cellpadding="3" cellspacing="1">
+ <table border width="100%" align="left" cellpadding="3" cellspacing="1">
\$fileHeader
\$topCheckAll
\$fileStr
\${h2("History of \${EscHTML(\$dirDisplay)}")}
<br>
-<table cellspacing="2" cellpadding="3">
+<table border cellspacing="2" cellpadding="3">
<tr class="fviewheader"><td>Backup number</td>\$backupNumStr</tr>
<tr class="fviewheader"><td>Backup time</td>\$backupTimeStr</tr>
\$fileStr
\${h1("Host \$host Configuration Editor")}
<p>
Note: Check Override if you want to modify a value specific to this host.
+<p>
EOF
$Lang{CfgEdit_Button_Save} = "Save";
$Lang{CfgEdit_Button_Override} = "Override";
$Lang{CfgEdit_Button_New_Key} = "New Key";
+$Lang{CfgEdit_Error_No_Save}
+ = "ENG Error: No save due to errors";
$Lang{CfgEdit_Error__must_be_an_integer}
= "Error: \$var must be an integer";
$Lang{CfgEdit_Error__must_be_real_valued_number}
<input type="hidden" name="type" value="3">
\$hiddenStr
<input type="hidden" value="\$In{action}" name="action">
-<table border="0">
+<table class="tableStnd" border="0">
<tr>
<td>Restaure les fichiers vers l'hôte</td>
<td><!--<input type="text" size="40" value="\${EscHTML(\$host)}"
la machine \$In{hostDest}. Les fichiers suivants vont être restaurés
dans le partage \$In{shareDest}, depuis la sauvegarde numéro \$num:
<p>
-<table border>
-<tr><td>Fichier/Répertoire original</td><td>Va être restauré à</td></tr>
+<table class="tableStnd" border>
+<tr class="tableheader"><td>Fichier/Répertoire original</td><td>Va être restauré à</td></tr>
\$fileListStr
</table>
</td><td width="3%">
</td><td valign="top">
<br>
- <table border="0" width="100%" align="left" cellpadding="3" cellspacing="1">
+ <table border width="100%" align="left" cellpadding="3" cellspacing="1">
\$fileHeader
\$topCheckAll
\$fileStr
\${h2("Historique de \${EscHTML(\$dirDisplay)}")}
<br>
-<table cellspacing="2" cellpadding="3">
+<table border cellspacing="2" cellpadding="3">
<tr class="fviewheader"><td>Numéro de sauvegarde</td>\$backupNumStr</tr>
<tr class="fviewheader"><td>Date</td>\$backupTimeStr</tr>
\$fileStr
\${h1("Éditeur de la configuration de \$host")}
<p>
Note: Cochez Écraser pour modifier une valeur spécifique à cette machine.
+<p>
EOF
$Lang{CfgEdit_Button_Save} = "Sauvegarder";
$Lang{CfgEdit_Button_Override} = "Écraser";
$Lang{CfgEdit_Button_New_Key} = "Nouvelle clé";
+$Lang{CfgEdit_Error_No_Save}
+ = "ENG Error: No save due to errors";
$Lang{CfgEdit_Error__must_be_an_integer}
= "Erreur: \$var doit être un nombre entier";
$Lang{CfgEdit_Error__must_be_real_valued_number}
<input type="hidden" name="type" value="3">
\$hiddenStr
<input type="hidden" value="\$In{action}" name="action">
-<table border="0">
+<table class="tableStnd" border="0">
<tr>
<td>Ripristino dei file sull\'host</td>
<td><!--<input type="text" size="40" value="\${EscHTML(\$host)}"
I file seguenti saranno ripristinati sulla condivisione \$In{shareDest}
dal backup numero \$num:
<p>
-<table border>
-<tr><td>File/directory originale</td><td>Ripristinato su</td></tr>
+<table class="tableStnd" border>
+<tr class="tableheader"><td>File/directory originale</td><td>Ripristinato su</td></tr>
\$fileListStr
</table>
</td><td width="3%">
</td><td valign="top">
<br>
- <table border="0" width="100%" align="left" cellpadding="3" cellspacing="1">
+ <table border width="100%" align="left" cellpadding="3" cellspacing="1">
\$fileHeader
\$topCheckAll
\$fileStr
\${h2("Cronologia di \${EscHTML(\$dirDisplay)}")}
<br>
-<table cellspacing="2" cellpadding="3">
+<table border cellspacing="2" cellpadding="3">
<tr class="fviewheader"><td>Numero backup</td>\$backupNumStr</tr>
<tr class="fviewheader"><td>Data backup</td>\$backupTimeStr</tr>
\$fileStr
\${h1("Host \$host Configuration Editor")}
<p>
Note: Check Override if you want to modify a value specific to this host.
+<p>
EOF
$Lang{CfgEdit_Button_Save} = "Save";
$Lang{CfgEdit_Button_Override} = "Override";
$Lang{CfgEdit_Button_New_Key} = "New Key";
+$Lang{CfgEdit_Error_No_Save}
+ = "ENG Error: No save due to errors";
$Lang{CfgEdit_Error__must_be_an_integer}
= "Error: \$var must be an integer";
$Lang{CfgEdit_Error__must_be_real_valued_number}
<input type="hidden" name="type" value="3">
\$hiddenStr
<input type="hidden" value="\$In{action}" name="action">
-<table border="0">
+<table class="tableStnd" border="0">
<tr>
<td>Zet de bestanden terug naar de pc</td>
<td><!--<input type="text" size="40" value="\${EscHTML(\$host)}"
De volgende bestanden zullen hersteld worden in share \$In{shareDest},
uit backup nummer \$num:
<p>
-<table border>
-<tr><td>Oorspronkelijk bestand/map</td><td>zal hersteld worden in</td></tr>
+<table class="tableStnd" border>
+<tr class="tableheader"><td>Oorspronkelijk bestand/map</td><td>zal hersteld worden in</td></tr>
\$fileListStr
</table>
</td><td width="3%">
</td><td valign="top">
<br>
- <table border="0" width="100%" align="left" cellpadding="3" cellspacing="1">
+ <table border width="100%" align="left" cellpadding="3" cellspacing="1">
\$fileHeader
\$topCheckAll
\$fileStr
\${h2("Geschiedenis van \${EscHTML(\$dirDisplay)}")}
<br>
-<table cellspacing="2" cellpadding="3">
+<table border cellspacing="2" cellpadding="3">
<tr class="fviewheader"><td>backup nummer</td>\$backupNumStr</tr>
<tr class="fviewheader"><td>backup moment</td>\$backupTimeStr</tr>
\$fileStr
\${h1("Bewerken specifieke configuratie van machine \$host ")}
<p>
NB: Selecteer 'Overschrijven' als je een waarde wil wijzigen specifiek voor deze machine.
+<p>
EOF
$Lang{CfgEdit_Button_Save} = "Bewaren";
$Lang{CfgEdit_Button_Override} = "Overschrijven";
$Lang{CfgEdit_Button_New_Key} = "Nieuwe sleutel";
+$Lang{CfgEdit_Error_No_Save}
+ = "ENG Error: No save due to errors";
$Lang{CfgEdit_Error__must_be_an_integer}
= "Fout: \$var moet een geheel getal zijn";
$Lang{CfgEdit_Error__must_be_real_valued_number}
<input type="hidden" name="type" value="3">
\$hiddenStr
<input type="hidden" value="\$In{action}" name="action">
-<table border="0">
+<table class="tableStnd" border="0">
<tr>
<td>Restaurar os arquivos no host</td>
<td><!--<input type="text" size="40" value="\${EscHTML(\$host)}"
Os seguintes arquivos serão restaurados na unidade \$In{shareDest}, a partir
do Backup número \$num:
<p>
-<table border>
-<tr><td>Arquivo/Dir Original </td><td>Será restaurado em</td></tr>
+<table class="tableStnd" border>
+<tr class="tableheader"><td>Arquivo/Dir Original </td><td>Será restaurado em</td></tr>
\$fileListStr
</table>
</td><td width="3%">
</td><td valign="top">
<br>
- <table border="0" width="100%" align="left" cellpadding="3" cellspacing="1">
+ <table border width="100%" align="left" cellpadding="3" cellspacing="1">
\$fileHeader
\$topCheckAll
\$fileStr
\${h2("Histórico de \${EscHTML(\$dirDisplay)}")}
<br>
-<table cellspacing="2" cellpadding="3">
+<table border cellspacing="2" cellpadding="3">
<tr class="fviewheader"><td>Backup numero</td>\$backupNumStr</tr>
<tr class="fviewheader"><td>Backup time</td>\$backupTimeStr</tr>
\$fileStr
EOF
#######################################################################
-# Configuration editor strings (all ENGLISH currently)
+# Configuration editor strings
#######################################################################
$Lang{Only_privileged_users_can_edit_config_files} = "Somente usuários privilegiados podem editar as configurações.";
\${h1("Editor de configurações do Host \$host")}
<p>
Note: Marque Override se você quiser modificar um valor especificamente neste host.
+<p>
EOF
$Lang{CfgEdit_Button_Save} = "Salvar";
$Lang{CfgEdit_Button_Override} = "Sobrepor";
$Lang{CfgEdit_Button_New_Key} = "New Key";
+$Lang{CfgEdit_Error_No_Save}
+ = "ENG Error: No save due to errors";
$Lang{CfgEdit_Error__must_be_an_integer}
= "Erro: \$var precisa ser um inteiro";
$Lang{CfgEdit_Error__must_be_real_valued_number}
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
my $bpc = bless {
%$paths,
- Version => '3.0.0beta1',
+ Version => '3.0.0beta2',
}, $class;
$bpc->{storage} = BackupPC::Storage->new($paths);
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
push(@{$a->{errors}},
"Unable to open $a->{fileName}"
. " for writing after link fail\n");
+ } else {
+ $a->filePartialCopy($a->{files}[$i]->{fh}, $a->{fhOut},
+ $a->{nWrite});
+ $a->{fhOut}->close;
}
- $a->filePartialCopy($a->{files}[$i]->{fh}, $a->{fhOut},
- $a->{nWrite});
- $a->{fhOut}->close;
last;
}
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
{
my($s, $inFile, $newConf) = @_;
local(*C);
- my($contents, $out);
- my $comment = 1;
- my $skipVar = 0;
- my $endLine = undef;
+ my($contents, $skipExpr, $fakeVar);
my $done = {};
if ( -f $inFile ) {
binmode(C);
while ( <C> ) {
- if ( $comment && /^\s*#/ ) {
- $out .= $_;
- } elsif ( /^\s*\$Conf\{([^}]*)\}\s*=/ ) {
+ if ( /^\s*\$Conf\{([^}]*)\}\s*=(.*)/ ) {
my $var = $1;
- if ( exists($newConf->{$var}) ) {
- $contents .= $out;
+ if ( exists($newConf->{$var}) ) {
+ $skipExpr = "\$fakeVar = $2\n";
my $d = Data::Dumper->new([$newConf->{$var}], [*value]);
$d->Indent(1);
$d->Terse(1);
$contents .= "\$Conf{$var} = " . $value;
$done->{$var} = 1;
}
- if ( /^\s*\$Conf\{[^}]*} *= *<<(.*);/
- || /^\s*\$Conf\{[^}]*} *= *<<'(.*)';/ ) {
- $endLine = $1;
- $skipVar = 1;
- } else {
- $endLine = undef;
- $skipVar = /^[^#]*;/ ? 0 : 1;
- }
- $out = "";
- } elsif ( $skipVar ) {
- if ( !defined($endLine) && /^[^#]*;/ ) {
- $skipVar = 0;
- $comment = 1;
- }
- if ( defined($endLine) && /^\Q$endLine\E[\n\r]*$/ ) {
- $endLine = undef;
- $skipVar = 0;
- $comment = 1;
- }
+ } elsif ( defined($skipExpr) ) {
+ $skipExpr .= $_;
} else {
- $out .= $_;
+ $contents .= $_;
+ }
+ if ( defined($skipExpr) ) {
+ #
+ # if we have a complete expression, then we are done
+ # skipping text from the original config file.
+ #
+ eval($skipExpr);
+ $skipExpr = undef if ( $@ eq "" );
}
}
close(C);
- $contents .= $out;
}
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta1, released 30 Jul 2006.
+# Version 3.0.0beta2, released 11 Nov 2006.
#
# See http://backuppc.sourceforge.net.
#
umask(0022);
my $Version = "3.0.0beta2";
-my $ReleaseDate = "31 Oct 2006";
+my $ReleaseDate = "11 Nov 2006";
my $DistDir = "dist/BackupPC-$Version";
my @PerlSrc = qw(
"--outfile=doc/BackupPC.html");
foreach my $file ( (@PerlSrc,
- <images/*>,
+ <images/*.gif>,
+ <images/*.png>,
qw(
conf/config.pl
conf/hosts
my($file, $dest) = @_;
unlink($dest) if ( -d $dest );
- if ( $file =~ /\.gif/ ) {
+ if ( $file =~ /\.gif/ || $file =~ /\.png/ ) {
die("can't copy($file, $dest)\n") unless copy($file, $dest);
} else {
open(FILE, $file) || die("can't open $file for reading\n");