From d4da5664b6ee8b8e76d292348d784564fc72730e Mon Sep 17 00:00:00 2001 From: yinle Date: Mon, 21 Apr 2014 02:21:06 -0700 Subject: [PATCH] Modify the way of process mn arg --- xCAT-server/share/xcat/tools/xCATreg | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/xCAT-server/share/xcat/tools/xCATreg b/xCAT-server/share/xcat/tools/xCATreg index 753113d09..a75df7aff 100755 --- a/xCAT-server/share/xcat/tools/xCATreg +++ b/xCAT-server/share/xcat/tools/xCATreg @@ -751,12 +751,20 @@ if ($needhelp) # begin to find which mn should be used if ($management_node) { - foreach my $k (keys %confkeys) { - if ($confkeys{$k} eq $management_node) { - $mns{$k} = $management_node; - send_msg("specify mn $management_node"); - } + my @all; + if ($management_node =~ /,/) { + @all = split /,/, $management_node; + } else { + push @all, $management_node; } + foreach my $mn (@all) { + foreach my $k (keys %confkeys) { + if ($confkeys{$k} eq $mn) { + $mns{$k} = $mn; + send_msg("specify mn $mn"); + } + } + } } ####################################### # step 1. Read configuration files