X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_dump;h=f59e38a124247aebfca48a75c540f0b28edc4da7;hp=d1509b7aaa2464692c2af424ce7bde64e141d7f4;hb=a7e968ce327855f2ba2624ca8517069a936c9b5b;hpb=5729095faa3ef12dc5d4f02538c3650ac81912ef diff --git a/bin/BackupPC_dump b/bin/BackupPC_dump index d1509b7..f59e38a 100755 --- a/bin/BackupPC_dump +++ b/bin/BackupPC_dump @@ -126,20 +126,19 @@ if ( $opts{d} ) { # $hostIP = $client; if ( $bpc->CheckHostAlive($hostIP) < 0 ) { - print("Exiting because CheckHostAlive($hostIP) failed\n") + print(STDERR "Exiting because CheckHostAlive($hostIP) failed\n") if ( $opts{v} ); exit(1); } if ( $Conf{NmbLookupCmd} eq "" ) { - print("Exiting because \$Conf{NmbLookupCmd} is empty\n") + print(STDERR "Exiting because \$Conf{NmbLookupCmd} is empty\n") if ( $opts{v} ); exit(1); } ($client, $user) = $bpc->NetBiosInfoGet($hostIP); if ( $client !~ /^([\w\.\s-]+)$/ ) { - print("Exiting because NetBiosInfoGet($hostIP) returned '$client'," - . " an invalid host name\n") - if ( $opts{v} ); + print(STDERR "Exiting because NetBiosInfoGet($hostIP) returned" + . " '$client', an invalid host name\n") if ( $opts{v} ); exit(1) } $Hosts = $bpc->HostInfoRead($client); @@ -148,8 +147,8 @@ if ( $opts{d} ) { $Hosts = $bpc->HostInfoRead($client); } if ( !defined($Hosts->{$client}) ) { - print("Exiting because host $client does not exist in the hosts file\n") - if ( $opts{v} ); + print(STDERR "Exiting because host $client does not exist in the" + . " hosts file\n") if ( $opts{v} ); exit(1) } @@ -200,6 +199,13 @@ if ( $opts{e} ) { exit(0); } +# +# For archive hosts we don't bother any further +# +if ($Conf{XferMethod} eq "archive" ) { + exit(0); +} + if ( !$opts{d} ) { # # In the non-DHCP case, make sure the host can be looked up @@ -215,7 +221,7 @@ if ( !$opts{d} ) { # Ok, NS doesn't know about it. Maybe it is a NetBios name # instead. # - print("Name server doesn't know about $host; trying NetBios\n") + print(STDERR "Name server doesn't know about $host; trying NetBios\n") if ( $opts{v} ); if ( !defined($hostIP = $bpc->NetBiosHostIPFind($host)) ) { print(LOG $bpc->timeStamp, "Can't find host $host via netbios\n"); @@ -253,7 +259,7 @@ $bpc->ServerDisconnect(); if ( $opts{d} ) { if ( $StatusHost{activeJob} ) { # oops, something is already running for this host - print("Exiting because backup is already running for $client\n") + print(STDERR "Exiting because backup is already running for $client\n") if ( $opts{v} ); exit(0); }