summaryrefslogtreecommitdiffstats
path: root/plugins-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-scripts')
-rwxr-xr-xplugins-scripts/check_breeze.pl4
-rwxr-xr-xplugins-scripts/check_disk_smb.pl4
-rwxr-xr-xplugins-scripts/check_file_age.pl4
-rwxr-xr-xplugins-scripts/check_flexlm.pl4
-rwxr-xr-xplugins-scripts/check_ifoperstatus.pl6
-rwxr-xr-xplugins-scripts/check_ifstatus.pl8
-rwxr-xr-xplugins-scripts/check_ircd.pl4
-rwxr-xr-xplugins-scripts/check_mailq.pl4
-rwxr-xr-xplugins-scripts/check_mssql.pl2
-rwxr-xr-xplugins-scripts/check_netdns.pl6
-rwxr-xr-xplugins-scripts/check_ntp.pl4
-rwxr-xr-xplugins-scripts/check_rpc.pl4
-rwxr-xr-xplugins-scripts/check_wave.pl4
-rw-r--r--plugins-scripts/t/check_rpc.t2
14 files changed, 30 insertions, 30 deletions
diff --git a/plugins-scripts/check_breeze.pl b/plugins-scripts/check_breeze.pl
index 12a60ee..05b9920 100755
--- a/plugins-scripts/check_breeze.pl
+++ b/plugins-scripts/check_breeze.pl
@@ -28,10 +28,10 @@ GetOptions
28 28
29if ($opt_V) { 29if ($opt_V) {
30 print_revision($PROGNAME,'@NP_VERSION@'); 30 print_revision($PROGNAME,'@NP_VERSION@');
31 exit $ERRORS{'OK'}; 31 exit $ERRORS{'UNKNOWN'};
32} 32}
33 33
34if ($opt_h) {print_help(); exit $ERRORS{'OK'};} 34if ($opt_h) {print_help(); exit $ERRORS{'UNKNOWN'};}
35 35
36($opt_H) || usage("Host name/address not specified\n"); 36($opt_H) || usage("Host name/address not specified\n");
37my $host = $1 if ($opt_H =~ /([-.A-Za-z0-9]+)/); 37my $host = $1 if ($opt_H =~ /([-.A-Za-z0-9]+)/);
diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl
index 99948a4..9899226 100755
--- a/plugins-scripts/check_disk_smb.pl
+++ b/plugins-scripts/check_disk_smb.pl
@@ -54,10 +54,10 @@ GetOptions
54 54
55if ($opt_V) { 55if ($opt_V) {
56 print_revision($PROGNAME,'@NP_VERSION@'); #' 56 print_revision($PROGNAME,'@NP_VERSION@'); #'
57 exit $ERRORS{'OK'}; 57 exit $ERRORS{'UNKNOWN'};
58} 58}
59 59
60if ($opt_h) {print_help(); exit $ERRORS{'OK'};} 60if ($opt_h) {print_help(); exit $ERRORS{'UNKNOWN'};}
61 61
62my $smbclient = $utils::PATH_TO_SMBCLIENT; 62my $smbclient = $utils::PATH_TO_SMBCLIENT;
63$smbclient || usage("check requires smbclient, smbclient not set\n"); 63$smbclient || usage("check requires smbclient, smbclient not set\n");
diff --git a/plugins-scripts/check_file_age.pl b/plugins-scripts/check_file_age.pl
index 15330f7..56b8e97 100755
--- a/plugins-scripts/check_file_age.pl
+++ b/plugins-scripts/check_file_age.pl
@@ -60,12 +60,12 @@ GetOptions(
60 60
61if ($opt_V) { 61if ($opt_V) {
62 print_revision($PROGNAME, '@NP_VERSION@'); 62 print_revision($PROGNAME, '@NP_VERSION@');
63 exit $ERRORS{'OK'}; 63 exit $ERRORS{'UNKNOWN'};
64} 64}
65 65
66if ($opt_h) { 66if ($opt_h) {
67 print_help(); 67 print_help();
68 exit $ERRORS{'OK'}; 68 exit $ERRORS{'UNKNOWN'};
69} 69}
70 70
71$opt_f = shift unless ($opt_f); 71$opt_f = shift unless ($opt_f);
diff --git a/plugins-scripts/check_flexlm.pl b/plugins-scripts/check_flexlm.pl
index 49d674d..e3fe296 100755
--- a/plugins-scripts/check_flexlm.pl
+++ b/plugins-scripts/check_flexlm.pl
@@ -58,7 +58,7 @@ GetOptions
58 58
59if ($opt_V) { 59if ($opt_V) {
60 print_revision($PROGNAME,'@NP_VERSION@'); 60 print_revision($PROGNAME,'@NP_VERSION@');
61 exit $ERRORS{'OK'}; 61 exit $ERRORS{'UNKNOWN'};
62} 62}
63 63
64unless (defined $opt_t) { 64unless (defined $opt_t) {
@@ -66,7 +66,7 @@ unless (defined $opt_t) {
66} 66}
67 67
68 68
69if ($opt_h) {print_help(); exit $ERRORS{'OK'};} 69if ($opt_h) {print_help(); exit $ERRORS{'UNKNOWN'};}
70 70
71unless (defined $opt_F) { 71unless (defined $opt_F) {
72 print "Missing license.dat file\n"; 72 print "Missing license.dat file\n";
diff --git a/plugins-scripts/check_ifoperstatus.pl b/plugins-scripts/check_ifoperstatus.pl
index 1a7fbba..3eed4bc 100755
--- a/plugins-scripts/check_ifoperstatus.pl
+++ b/plugins-scripts/check_ifoperstatus.pl
@@ -367,17 +367,17 @@ sub process_arguments() {
367 367
368 if ($status == 0){ 368 if ($status == 0){
369 print_help(); 369 print_help();
370 exit $ERRORS{'OK'}; 370 exit $ERRORS{'UNKNOWN'};
371 } 371 }
372 372
373 if ($opt_V) { 373 if ($opt_V) {
374 print_revision($PROGNAME,'@NP_VERSION@'); 374 print_revision($PROGNAME,'@NP_VERSION@');
375 exit $ERRORS{'OK'}; 375 exit $ERRORS{'UNKNOWN'};
376 } 376 }
377 377
378 if ($opt_h) { 378 if ($opt_h) {
379 print_help(); 379 print_help();
380 exit $ERRORS{'OK'}; 380 exit $ERRORS{'UNKNOWN'};
381 } 381 }
382 382
383 if (! utils::is_hostname($hostname)){ 383 if (! utils::is_hostname($hostname)){
diff --git a/plugins-scripts/check_ifstatus.pl b/plugins-scripts/check_ifstatus.pl
index 2c76d0c..9f2f7c3 100755
--- a/plugins-scripts/check_ifstatus.pl
+++ b/plugins-scripts/check_ifstatus.pl
@@ -119,7 +119,7 @@ $status = process_arguments();
119if ($status != 0) 119if ($status != 0)
120{ 120{
121 print_help() ; 121 print_help() ;
122 exit $ERRORS{'OK'}; 122 exit $ERRORS{'UNKNOWN'};
123} 123}
124 124
125 125
@@ -313,17 +313,17 @@ sub process_arguments() {
313 313
314 if ($status == 0){ 314 if ($status == 0){
315 print_help(); 315 print_help();
316 exit $ERRORS{'OK'}; 316 exit $ERRORS{'UNKNOWN'};
317 } 317 }
318 318
319 if ($opt_V) { 319 if ($opt_V) {
320 print_revision($PROGNAME,'@NP_VERSION@'); 320 print_revision($PROGNAME,'@NP_VERSION@');
321 exit $ERRORS{'OK'}; 321 exit $ERRORS{'UNKNOWN'};
322 } 322 }
323 323
324 if ($opt_h) { 324 if ($opt_h) {
325 print_help(); 325 print_help();
326 exit $ERRORS{'OK'}; 326 exit $ERRORS{'UNKNOWN'};
327 } 327 }
328 328
329 unless (defined $timeout) { 329 unless (defined $timeout) {
diff --git a/plugins-scripts/check_ircd.pl b/plugins-scripts/check_ircd.pl
index afedfb9..22d21c2 100755
--- a/plugins-scripts/check_ircd.pl
+++ b/plugins-scripts/check_ircd.pl
@@ -181,10 +181,10 @@ MAIN:
181 181
182 if ($opt_V) { 182 if ($opt_V) {
183 print_revision($PROGNAME,'@NP_VERSION@'); 183 print_revision($PROGNAME,'@NP_VERSION@');
184 exit $ERRORS{'OK'}; 184 exit $ERRORS{'UNKNOWN'};
185 } 185 }
186 186
187 if ($opt_h) {print_help(); exit $ERRORS{'OK'};} 187 if ($opt_h) {print_help(); exit $ERRORS{'UNKNOWN'};}
188 188
189 ($opt_H) || ($opt_H = shift @ARGV) || usage("Host name/address not specified\n"); 189 ($opt_H) || ($opt_H = shift @ARGV) || usage("Host name/address not specified\n");
190 my $remotehost = $1 if ($opt_H =~ /([-.A-Za-z0-9]+)/); 190 my $remotehost = $1 if ($opt_H =~ /([-.A-Za-z0-9]+)/);
diff --git a/plugins-scripts/check_mailq.pl b/plugins-scripts/check_mailq.pl
index 3086e94..32f498d 100755
--- a/plugins-scripts/check_mailq.pl
+++ b/plugins-scripts/check_mailq.pl
@@ -573,12 +573,12 @@ sub process_arguments(){
573 573
574 if ($opt_V) { 574 if ($opt_V) {
575 print_revision($PROGNAME,'@NP_VERSION@'); 575 print_revision($PROGNAME,'@NP_VERSION@');
576 exit $ERRORS{'OK'}; 576 exit $ERRORS{'UNKNOWN'};
577 } 577 }
578 578
579 if ($opt_h) { 579 if ($opt_h) {
580 print_help(); 580 print_help();
581 exit $ERRORS{'OK'}; 581 exit $ERRORS{'UNKNOWN'};
582 } 582 }
583 583
584 if (defined $opt_v ){ 584 if (defined $opt_v ){
diff --git a/plugins-scripts/check_mssql.pl b/plugins-scripts/check_mssql.pl
index a436a8f..fb3952d 100755
--- a/plugins-scripts/check_mssql.pl
+++ b/plugins-scripts/check_mssql.pl
@@ -130,7 +130,7 @@ sub process_arguments {
130 130
131 if (defined $opt_V) { 131 if (defined $opt_V) {
132 print_revision($PROGNAME,'@NP_VERSION@'); 132 print_revision($PROGNAME,'@NP_VERSION@');
133 exit $ERRORS{'OK'}; 133 exit $ERRORS{'UNKNOWN'};
134 } 134 }
135 135
136 syntax("Help:") if ($help); 136 syntax("Help:") if ($help);
diff --git a/plugins-scripts/check_netdns.pl b/plugins-scripts/check_netdns.pl
index af1456b..fd41873 100755
--- a/plugins-scripts/check_netdns.pl
+++ b/plugins-scripts/check_netdns.pl
@@ -45,10 +45,10 @@ GetOptions("V" => $opt_V, "version" => $opt_V,
45 "H=s" => $opt_H, "hostname=s" => $opt_H); 45 "H=s" => $opt_H, "hostname=s" => $opt_H);
46 46
47# -h means display verbose help screen 47# -h means display verbose help screen
48if($opt_h){ print_help(); exit 0; } 48if($opt_h){ print_help(); exit 3; }
49 49
50# -V means display version number 50# -V means display version number
51if ($opt_V) { print_version(); exit 0; } 51if ($opt_V) { print_version(); exit 3; }
52 52
53# -H means host name 53# -H means host name
54$opt_H = shift unless ($opt_H); 54$opt_H = shift unless ($opt_H);
@@ -70,7 +70,7 @@ if ($opt_s) {
70 $server = $1; 70 $server = $1;
71 } else { 71 } else {
72 print "$opt_s is not a valid host name"; 72 print "$opt_s is not a valid host name";
73 exit -1; 73 exit 3;
74 } 74 }
75} 75}
76 76
diff --git a/plugins-scripts/check_ntp.pl b/plugins-scripts/check_ntp.pl
index dd2cd6d..f400001 100755
--- a/plugins-scripts/check_ntp.pl
+++ b/plugins-scripts/check_ntp.pl
@@ -98,12 +98,12 @@ GetOptions
98 98
99if ($opt_V) { 99if ($opt_V) {
100 print_revision($PROGNAME,'@NP_VERSION@'); 100 print_revision($PROGNAME,'@NP_VERSION@');
101 exit $ERRORS{'OK'}; 101 exit $ERRORS{'UNKNOWN'};
102} 102}
103 103
104if ($opt_h) { 104if ($opt_h) {
105 print_help(); 105 print_help();
106 exit $ERRORS{'OK'}; 106 exit $ERRORS{'UNKNOWN'};
107} 107}
108 108
109# jitter test params specified 109# jitter test params specified
diff --git a/plugins-scripts/check_rpc.pl b/plugins-scripts/check_rpc.pl
index cbdeceb..47d6e49 100755
--- a/plugins-scripts/check_rpc.pl
+++ b/plugins-scripts/check_rpc.pl
@@ -63,12 +63,12 @@ GetOptions(
63); 63);
64 64
65# -h means display verbose help screen 65# -h means display verbose help screen
66if ($opt_h) { print_help(); exit $ERRORS{'OK'}; } 66if ($opt_h) { print_help(); exit $ERRORS{'UNKNOWN'}; }
67 67
68# -V means display version number 68# -V means display version number
69if ($opt_V) { 69if ($opt_V) {
70 print_revision($PROGNAME,'@NP_VERSION@'); 70 print_revision($PROGNAME,'@NP_VERSION@');
71 exit $ERRORS{'OK'}; 71 exit $ERRORS{'UNKNOWN'};
72} 72}
73 73
74# Hash containing all RPC program names and numbers 74# Hash containing all RPC program names and numbers
diff --git a/plugins-scripts/check_wave.pl b/plugins-scripts/check_wave.pl
index 979416e..41e15f5 100755
--- a/plugins-scripts/check_wave.pl
+++ b/plugins-scripts/check_wave.pl
@@ -31,12 +31,12 @@ GetOptions
31 31
32if ($opt_V) { 32if ($opt_V) {
33 print_revision($PROGNAME,'@NP_VERSION@'); #' 33 print_revision($PROGNAME,'@NP_VERSION@'); #'
34 exit $ERRORS{'OK'}; 34 exit $ERRORS{'UNKNOWN'};
35} 35}
36 36
37if ($opt_h) { 37if ($opt_h) {
38 print_help(); 38 print_help();
39 exit $ERRORS{'OK'}; 39 exit $ERRORS{'UNKNOWN'};
40} 40}
41 41
42$opt_H = shift unless ($opt_H); 42$opt_H = shift unless ($opt_H);
diff --git a/plugins-scripts/t/check_rpc.t b/plugins-scripts/t/check_rpc.t
index be8ae2f..c58f7bf 100644
--- a/plugins-scripts/t/check_rpc.t
+++ b/plugins-scripts/t/check_rpc.t
@@ -15,7 +15,7 @@ my $successOutput = '/^check_rpc/';
15 15
16my $t; 16my $t;
17 17
18$t += checkCmd( "./check_rpc -V", 0, $successOutput ); 18$t += checkCmd( "./check_rpc -V", 3, $successOutput );
19 19
20exit(0) if defined($Test::Harness::VERSION); 20exit(0) if defined($Test::Harness::VERSION);
21exit($tests - $t); 21exit($tests - $t);