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