diff -r 6d401297850b -r e21e904c1320 plugins/check_dns-delegation --- a/plugins/check_dns-delegation Wed Jan 07 15:56:05 2015 +0100 +++ b/plugins/check_dns-delegation Wed Jan 07 17:14:18 2015 +0100 @@ -47,6 +47,8 @@ master/slave zones. The 127.in-addr.arpa, 168.192.in-addr.arpa, and 0.in-addr.arpa, and 127.in-addr.arpa zones are suppressed. +The B domains are added automatically (See opt B). + =back =cut @@ -100,7 +102,8 @@ } sub get_domains { - my @sources = @_; + my %arg = @_; + my @sources = @{ $arg{sources} }; my @domains = (); foreach my $src (@sources) { @@ -113,6 +116,7 @@ if ($src =~ m{^local:}) { push @domains, get_local_zones; + push @domains, @{$arg{local}} if $arg{local}; next; } @@ -235,11 +239,11 @@ ) and @argv or pod2usage; - my @domains = get_domains(@argv); my %override = read_override($opt_override) if defined $opt_override; + my @domains = get_domains(sources => \@argv, local => [keys %override]); my (@OK, %CRITICAL); - foreach my $domain (shuffle @domains, keys %override) { + foreach my $domain (shuffle @domains) { print STDERR "$domain " if $opt_progress; my @ns = eval { ns_ok($domain, $opt_reference, \%override) };