summaryrefslogtreecommitdiffstats
path: root/plugins-scripts/check_netdns.pl
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-scripts/check_netdns.pl')
-rwxr-xr-xplugins-scripts/check_netdns.pl11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins-scripts/check_netdns.pl b/plugins-scripts/check_netdns.pl
index af1456b..38538e5 100755
--- a/plugins-scripts/check_netdns.pl
+++ b/plugins-scripts/check_netdns.pl
@@ -32,6 +32,9 @@ use lib "$FindBin::Bin";
32use utils; 32use utils;
33 33
34my $PROGNAME = "check_netdns"; 34my $PROGNAME = "check_netdns";
35sub print_help ();
36sub print_version();
37sub print_usage ();
35 38
36$ENV{'PATH'}='@TRUSTED_PATH@'; 39$ENV{'PATH'}='@TRUSTED_PATH@';
37$ENV{'BASH_ENV'}=''; 40$ENV{'BASH_ENV'}='';
@@ -43,12 +46,12 @@ GetOptions("V" => $opt_V, "version" => $opt_V,
43 "t=i" => $opt_t, "timeout=i" => $opt_t, 46 "t=i" => $opt_t, "timeout=i" => $opt_t,
44 "s=s" => $opt_s, "server=s" => $opt_s, 47 "s=s" => $opt_s, "server=s" => $opt_s,
45 "H=s" => $opt_H, "hostname=s" => $opt_H); 48 "H=s" => $opt_H, "hostname=s" => $opt_H);
46 49
47# -h means display verbose help screen 50# -h means display verbose help screen
48if($opt_h){ print_help(); exit 0; } 51if($opt_h){ print_help(); exit 3; }
49 52
50# -V means display version number 53# -V means display version number
51if ($opt_V) { print_version(); exit 0; } 54if ($opt_V) { print_version(); exit 3; }
52 55
53# -H means host name 56# -H means host name
54$opt_H = shift unless ($opt_H); 57$opt_H = shift unless ($opt_H);
@@ -70,7 +73,7 @@ if ($opt_s) {
70 $server = $1; 73 $server = $1;
71 } else { 74 } else {
72 print "$opt_s is not a valid host name"; 75 print "$opt_s is not a valid host name";
73 exit -1; 76 exit 3;
74 } 77 }
75} 78}
76 79