X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_ASA_SearchUpdate;h=20d5ccd9a0767ec35a2f11ad316b0479073d2be6;hp=5cff61f6f0ebeec4b76ad5d8da307d33efa6c8f8;hb=6e9be0d94e5d99b8259d3801c638728eaccde5c4;hpb=f5ef8b2546333a4b7c7cf27ae62542346fbeeef5 diff --git a/bin/BackupPC_ASA_SearchUpdate b/bin/BackupPC_ASA_SearchUpdate index 5cff61f..20d5ccd 100755 --- a/bin/BackupPC_ASA_SearchUpdate +++ b/bin/BackupPC_ASA_SearchUpdate @@ -59,7 +59,7 @@ my $dbh = DBI->connect($dsn, $user, "", { RaiseError => 1, AutoCommit => 0 }); my %opt; -if ( !getopts("cdm:v:ijfq", \%opt ) ) { +if ( !getopts("cdm:v:ijfqh:", \%opt ) ) { print STDERR <{$host_key}->{'host'} || die "can't find host for $host_key"; - $sth->{hosts_by_name}->execute($hosts->{$host_key}->{'host'}); + next if $host_regex && $hostname =~ m/$host_regex/; + + $sth->{hosts_by_name}->execute($hostname); unless (($hostID) = $sth->{hosts_by_name}->fetchrow_array()) { $sth->{insert_hosts}->execute(