From 8562e5e4549c500f2580c9fb4cbd6b65ab2376cf Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 1 Mar 2011 15:43:34 +0000 Subject: [PATCH] -Permit '.0' to exist after portname for Juniper setups git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8951 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/MacMap.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/MacMap.pm b/perl-xCAT/xCAT/MacMap.pm index f26eeb647..a339ac402 100644 --- a/perl-xCAT/xCAT/MacMap.pm +++ b/perl-xCAT/xCAT/MacMap.pm @@ -107,10 +107,11 @@ OID, and have the switch table port value match exactly the format suggested by } - unless ($namepersnmp =~ /[^0123456789]$namepercfg\z/) { + unless ($namepersnmp =~ /[^0123456789]$namepercfg(\.0)?\z/) { #ensure name from user exists in the string without being preceeded immediately by a number, and allowing a .0 to exist after the cfg for juniper #Most common case, won't match at all return 0; } + #at this point we know the string the user wanted does exist on this port, now we move on to non-ethernet ports that may ambiguously match the user request as well #stop contemplating vlan, Nu, stacking ports, and console interfaces if (($namepersnmp =~ /vl/i) or ($namepersnmp =~ /Nu/) or ($namepersnmp =~ /onsole/) or ($namepersnmp =~ /Stack/)) {