From e8edeca80ccdab828820dbac20bbe15f3ec6b59a Mon Sep 17 00:00:00 2001 From: ligc Date: Tue, 16 Apr 2013 02:48:38 +0000 Subject: [PATCH] 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/trunk@15977 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/DBobjectdefs.pm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm index 64718d752..8f8960ba6 100644 --- a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm @@ -2536,6 +2536,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) { @@ -2598,6 +2601,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; + } + } } } @@ -2609,9 +2621,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