check_sieve: Fixing Bareword 'UNKNOWN'
This commit is contained in:
		
							parent
							
								
									5b545ac648
								
							
						
					
					
						commit
						2b07b2053d
					
				
					 2 changed files with 29 additions and 0 deletions
				
			
		
							
								
								
									
										28
									
								
								debian/patches/check_sieve/BareWord
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								debian/patches/check_sieve/BareWord
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,28 @@
 | 
			
		|||
--- a/check_sieve/check_sieve
 | 
			
		||||
+++ b/check_sieve/check_sieve
 | 
			
		||||
@@ -149,13 +149,13 @@
 | 
			
		||||
     $p->nagios_die( ' invalid number supplied for the -r option ' );
 | 
			
		||||
 }
 | 
			
		||||
 unless ( defined $p->opts->warning || defined $p->opts->critical ) {
 | 
			
		||||
-	$p->nagios_die('Please supply a warning or critical threshold argument', UNKNOWN);
 | 
			
		||||
+	$p->nagios_exit('UNKNOWN', 'Please supply a warning or critical threshold argument');
 | 
			
		||||
 }
 | 
			
		||||
 if ( $p->opts->warning == $p->opts->critical ) {
 | 
			
		||||
-	$p->nagios_die('Critical is equal to Warning', UNKNOWN);
 | 
			
		||||
+	$p->nagios_exit('UNKNOWN', 'Critical is equal to Warning');
 | 
			
		||||
 }
 | 
			
		||||
 if ( $p->opts->warning > $p->opts->critical ) {
 | 
			
		||||
-	$p->nagios_die('Critical is longer than Warning', UNKNOWN);
 | 
			
		||||
+	$p->nagios_exit('UNKNOWN', 'Critical is longer than Warning');
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
 
 | 
			
		||||
@@ -185,7 +185,7 @@
 | 
			
		||||
 	Domain   => $family,
 | 
			
		||||
 	Proto    => 'tcp',
 | 
			
		||||
 	Timeout  => $p->opts->timeout
 | 
			
		||||
-) or $p->nagios_exit(UNKNOWN, 'Unable to connect to: '. $p->opts->host .':'.$p->opts->port);
 | 
			
		||||
+) or $p->nagios_exit('UNKNOWN', 'Unable to connect to: '. $p->opts->host .':'.$p->opts->port);
 | 
			
		||||
 $peer_address = $sock->peerhost() . ':' . $sock->peerport();
 | 
			
		||||
 
 | 
			
		||||
 SOCKETLOOP:
 | 
			
		||||
							
								
								
									
										1
									
								
								debian/patches/series
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								debian/patches/series
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -7,5 +7,6 @@ check_mysql_slave//epn
 | 
			
		|||
check_sieve/epn
 | 
			
		||||
check_sieve/10_pathes
 | 
			
		||||
check_sieve/MonitoringPlugin
 | 
			
		||||
check_sieve/BareWord
 | 
			
		||||
check_tftp/epn
 | 
			
		||||
check_tomcat/epn
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue