David writes:
> Having just installed 3.0.0-beta2 on my Gentoo system, I then attempted
> to change server name from XXXXXX to OSAGE. Got "save error; bzip2path
> bad" message. Changed bzip2 path from /usr/bin/bzip2 to /bin/bzip2
> and successfully saved the conf. Apache then reported:
>
> "Error: Unable to read config.pl or language strings!!"
>
> The error log has the followign message
>
> [Fri Nov 24 09:45:49 2006] [error] [client 192.168.1.10] Couldn't
> execute /etc/BackupPC/config.pl: syntax error at
> /etc/BackupPC/config.pl line 991, near ".", referer:
> http://backuppc.osagesoftware.com/cgi-bin/BackupPC_Admin?action=editConfig
>
>
> Diffing the old and new config files I found a problem (shown below).
> The 3 lines setting SmbClientIncrCmd should have all been replaced,
> but only 1 line was replaced:
This is a bug. Here's a patch.
Craig
--- lib/BackupPC/Storage/Text.pm 2006-11-18 22:07:58.000000000 -0800
+++ lib/BackupPC/Storage/Text.pm 2006-11-26 16:05:49.000000000 -0800
@@ -344,8 +344,8 @@
while ( <C> ) {
if ( /^\s*\$Conf\{([^}]*)\}\s*=(.*)/ ) {
my $var = $1;
+ $skipExpr = "\$fakeVar = $2\n";
if ( exists($newConf->{$var}) ) {
- $skipExpr = "\$fakeVar = $2\n";
my $d = Data::Dumper->new([$newConf->{$var}], [*value]);
$d->Indent(1);
$d->Terse(1);
@@ -359,7 +359,9 @@
} else {
$contents .= $_;
}
- if ( defined($skipExpr) ) {
+ if ( defined($skipExpr)
+ && ($skipExpr =~ /^\$fakeVar = *<</
+ || $skipExpr =~ /;[\n\r]*$/) ) {
#
# if we have a complete expression, then we are done
# skipping text from the original config file.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
BackupPC-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/