fix makeconservercf bug:makeconservercf cannot work for a noderange

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2343 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
zhanx 2008-10-14 11:19:57 +00:00
parent e3a3ca1216
commit 83da9f7584

View File

@ -230,6 +230,17 @@ sub makeconservercf {
my @cfgents1;# = $hmtab->getAllNodeAttribs(['cons','serialport','mgt','conserver','termserver','termport']);
if (($nodes and @$nodes > 0) or $req->{noderange}->[0]) {
@cfgents1 = $hmtab->getNodesAttribs($nodes,['cons','serialport','mgt','conserver','termserver','termport']);
#to make the result consistent to getAllNodeAttribs
my @tmpcfgents1;
foreach my $ent (@cfgents1)
{
foreach my $nodeent ( keys %$ent)
{
push @tmpcfgents1, $ent->{$nodeent}->[0] ;
}
}
@cfgents1 = @tmpcfgents1
} else {
@cfgents1 = $hmtab->getAllNodeAttribs(['cons','serialport','mgt','conserver','termserver','termport']);
}