fix for bug 3476: set @::finalTypeList based on both CLI and FILEATTR

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15976 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
ligc 2013-04-16 02:48:33 +00:00
parent 9c89936b69
commit 093e1cb8e4

View File

@ -2539,6 +2539,9 @@ sub setFINALattrs
my $error = 0;
# set the final hash based on the info from the file hash and cmd line hash
@::finalTypeList = ();
# set the final hash based on the info from the input file
if (@::fileobjnames)
{
@ -2601,6 +2604,15 @@ sub setFINALattrs
{
$::FINALATTRS{$objname}{$attr} =
$::FILEATTRS{$objname}{$attr};
if ($attr eq 'objtype')
{
if (!grep(/^$::FINALATTRS{$objname}{objtype}$/, @::finalTypeList))
{
my $type = $::FINALATTRS{$objname}{objtype};
chomp $type;
push @::finalTypeList, $type;
}
}
}
}
@ -2612,9 +2624,6 @@ sub setFINALattrs
}
}
# set the final hash based on the info from the cmd line hash
@::finalTypeList = ();
foreach my $objname (@::clobjnames)
{
# special case for the nic* attributes