SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
[BackupPC-devel] PATCH: Problem found with BackupPC_dump in
Author Message
Post [BackupPC-devel] PATCH: Problem found with BackupPC_dump in 
I think I found a small typo/problem with BackupPC_dump in the 2.0.0beta1
and the current (as of 2003/4/10 about 16:00 PDT) CVS tree. The symptom is
that *no* DHCP backups start. You can submit a request for a manual backup,
and it will say that it was accepted, but nothing happens - no error is
logged either.

A little investigating shows that one line should have a variable change
from "$host" to "$client". This fixed it for our site. Here is a patch:

diff -c BackupPC_dump BackupPC_dump.dist
*** BackupPC_dump Thu Apr 10 15:43:31 2003
--- BackupPC_dump.dist Thu Apr 10 15:43:14 2003
***************
*** 123,129 ****
exit(1) if ( $bpc->CheckHostAlive($hostIP) < 0
|| $Conf{NmbLookupCmd} eq "" );
($client, $user) = $bpc->NetBiosInfoGet($hostIP);
! exit(1) if ( $client !~ /^([\w\.\s-]+)$/ );
$Hosts = $bpc->HostInfoRead($client);
exit(1) if ( !defined($Hosts->{$client}) );
$host = $client;
--- 123,129 ----
exit(1) if ( $bpc->CheckHostAlive($hostIP) < 0
|| $Conf{NmbLookupCmd} eq "" );
($client, $user) = $bpc->NetBiosInfoGet($hostIP);
! exit(1) if ( $host !~ /^([\w\.\s-]+)$/ );
$Hosts = $bpc->HostInfoRead($client);
exit(1) if ( !defined($Hosts->{$client}) );
$host = $client;

I guess another option is to simply move the line "$host = $client;"
alright after the call to $bpc->NetBiosInfoGet($hostIP).

One thing that may be a nice addition for future versions of BackupPC are
command line options for verbose output and debugging. Of course, Craig's
code is so nice that we don't *really* need this Wink but in this instance I
had to place a few print statements to see what was happening.

Tim

--
Timothy Demarest ArrayComm, Inc.
demarest < at > arraycomm.com 2480 North 1st Street, Suite 200
http://www.arraycomm.com San Jose, CA 95131


-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
BackupPC-devel mailing list
BackupPC-devel < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-devel
http://backuppc.sourceforge.net/

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB