[Nagiosplug-checkins] nagiosplug/plugins-scripts check_ifoperstatus.pl, 1.6, 1.7

Gavin Carr gonzai at users.sourceforge.net
Fri Mar 16 13:11:49 CET 2007


Update of /cvsroot/nagiosplug/nagiosplug/plugins-scripts
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv19683

Modified Files:
	check_ifoperstatus.pl 
Log Message:
Fix bogus 'eq (  ||  )' constructions in check_ifoperstatus.pl.

Index: check_ifoperstatus.pl
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins-scripts/check_ifoperstatus.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- check_ifoperstatus.pl	7 Dec 2004 03:13:14 -0000	1.6
+++ check_ifoperstatus.pl	16 Mar 2007 12:11:46 -0000	1.7
@@ -384,15 +384,15 @@
 		if (defined $seclevel  && defined $secname) {
 		
 			# Must define a security level even though defualt is noAuthNoPriv
-			unless ($seclevel eq ('noAuthNoPriv' || 'authNoPriv' || 'authPriv' ) ) {
+			unless ( grep /^$seclevel$/, qw(noAuthNoPriv authNoPriv authPriv) ) {
 				usage();
 				exit $ERRORS{"UNKNOWN"};
 			}
 			
 			# Authentication wanted
-			if ($seclevel eq ('authNoPriv' || 'authPriv') ) {
+			if ( $seclevel eq 'authNoPriv' || $seclevel eq 'authPriv' ) {
 		
-				unless ($authproto eq ('MD5' || 'SHA1') ) {
+				unless ( $authproto eq 'MD5' || $authproto eq 'SHA1' ) {
 					usage();
 					exit $ERRORS{"UNKNOWN"};
 				}





More information about the Commits mailing list