From: Timothy D. <dem...@ar...> - 2003-04-10 23:09:22
|
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 ;-) but in this instance I had to place a few print statements to see what was happening. Tim -- Timothy Demarest ArrayComm, Inc. dem...@ar... 2480 North 1st Street, Suite 200 http://www.arraycomm.com San Jose, CA 95131 |