From 4e06d92c68c598f7089bccd546d2abc250d68990 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 7 Feb 2010 16:58:09 +0100 Subject: [PATCH] zone name is not an _option_, it is an argument --- .../checks/dsa-check-zone-rrsig-expiration | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dsa-nagios-checks/checks/dsa-check-zone-rrsig-expiration b/dsa-nagios-checks/checks/dsa-check-zone-rrsig-expiration index 1349863..02fd72b 100755 --- a/dsa-nagios-checks/checks/dsa-check-zone-rrsig-expiration +++ b/dsa-nagios-checks/checks/dsa-check-zone-rrsig-expiration @@ -39,6 +39,8 @@ # POSSIBILITY OF SUCH DAMAGE. # Copyright (c) 2010 Peter Palfrader +# - various fixes and cleanups +# - do more than one zone # usage @@ -75,11 +77,10 @@ use Time::Local; use List::Util qw ( shuffle ); my %opts = (t=>30); -getopts('hZ:dt:', \%opts); -usage() unless $opts{Z}; +getopts('hdt:', \%opts); +usage() unless scalar @ARGV == 1; usage() if $opts{h}; -my $zone = $opts{Z}; -$zone =~ s/^zone\.//; +my $zone = $ARGV[0]; my $data; my $start; @@ -252,7 +253,7 @@ sub output { } sub usage { - print STDERR "usage: $0 [-d] [-t=] -Z zone\n"; + print STDERR "usage: $0 [-d] [-t=] \n"; exit 3; } -- 2.20.1