From cb9794ccdbc943982e1619464c06f7a0297dfaaa Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 22 Aug 2013 14:35:21 -0400 Subject: [PATCH] Correct more issues with noderange --- perl-xCAT/xCAT/NodeRange.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/NodeRange.pm b/perl-xCAT/xCAT/NodeRange.pm index 3c01fb005..1a34b912b 100644 --- a/perl-xCAT/xCAT/NodeRange.pm +++ b/perl-xCAT/xCAT/NodeRange.pm @@ -602,12 +602,12 @@ sub noderange { my $op = ","; if ($start =~ m/-$/) { #subtract the parenthetical $op .= "-" - } elsif ($start =~ m/@$/) { + } elsif ($start =~ m/\@$/) { $op = "@" } $start =~ s/,-$//; $start =~ s/,$//; - $start =~ s/@$//; + $start =~ s/\@$//; %nodes = map { $_ => 1 } noderange($start,$verify,$exsitenode,%options); my %innernodes = map { $_ => 1 } noderange($middle,$verify,$exsitenode,%options); set_arith(\%nodes,$op,\%innernodes); @@ -628,7 +628,11 @@ sub noderange { if ($atom =~ /^-/) { # if this is an exclusion, strip off the minus, but remember it $atom = substr($atom,1); $op = $op."-"; + } elsif ($atom =~ /^\@/) { # if this is an exclusion, strip off the minus, but remember it + $atom = substr($atom,1); + $op = "@"; } + if ($atom eq '') { next; } if ($atom =~ /^\^(.*)$/) { # get a list of nodes from a file open(NRF,$1);