diff -r 0a7e49f69cb3 -r 3a7ef04681d6 plugins/check_amanda-client --- a/plugins/check_amanda-client Tue Jan 14 22:42:24 2014 +0100 +++ b/plugins/check_amanda-client Thu Jan 23 22:58:26 2014 +0100 @@ -81,7 +81,8 @@ eval { amchecks @confs } or critical $@; - my @dles = eval { compare_lists confs => \@confs, ignore => \@opt_ignore } or critical $@; + my @dles = eval { compare_lists confs => \@confs, ignore => \@opt_ignore } + or critical $@; ok 'config: ' . join(', ', @confs), @dles; # never reached @@ -216,12 +217,13 @@ } sub compare_lists { - my %arg = @_; - my @confs = @{$arg{confs}} or croak 'missing list of confs'; - my @ignore = @{$arg{ignore}}; + my %arg = @_; + my @confs = @{ $arg{confs} } or croak 'missing list of confs'; + my @ignore = @{ $arg{ignore} }; - warning "ignored filesystem(s) @$_ does not exist, update the config please!\n" - if @ignore and @$_ = grep { not -e } unique map { /^.*?:(.*)/ } @ignore; + warning + "ignored filesystem(s) @$_ does not exist, update the config please!\n" + if @ignore and @$_ = grep { not -e } unique map { /^.*?:(.*)/ } @ignore; my @candidates = get_devices; my %missing; @@ -235,7 +237,7 @@ $candidate->[0] ~~ [map { $_->[0] } @dles] and next; $candidate->[1] ~~ [map { $_->[1] } @dles] and next; push @{ $missing{$conf} }, $candidate->[0] - if not "$conf:$candidate->[0]" ~~ @ignore; + if not "$conf:$candidate->[0]" ~~ @ignore; } } die map { "$_ missing: " . join(', ' => @{ $missing{$_} }) . "\n" }