--- trunk/bin/BackupPC_updatedb 2005/12/09 12:49:55 246 +++ trunk/bin/BackupPC_updatedb 2005/12/09 16:27:49 249 @@ -121,11 +121,14 @@ my $skip_check = $opt{j} && print STDERR "Skipping check for existing files -- this should be used only with initital import\n"; - unless ($use_hest) { + unless (defined($use_hest)) { print STDERR "HyperEstraier support not enabled in configuration\n"; + $use_hest = 0; return; } + return unless($use_hest); + print curr_time," updating HyperEstraier:"; my $t = time(); @@ -458,7 +461,10 @@ VALUES (?,?,?,?,?,?,?) }); -foreach my $host_key (keys %{$hosts}) { +my @hosts = keys %{$hosts}; +my $host_nr = 0; + +foreach my $host_key (@hosts) { my $hostname = $hosts->{$host_key}->{'host'} || die "can't find host for $host_key"; @@ -473,7 +479,9 @@ $hostID = $dbh->last_insert_id(undef,undef,'hosts',undef); } - print "host ".$hosts->{$host_key}->{'host'}.": "; + $host_nr++; + print "host ", $hosts->{$host_key}->{'host'}, " [", + $host_nr, "/", ($#hosts + 1), "]: "; # get backups for a host my @backups = $bpc->BackupInfoRead($hostname);