From dd783ff14b3d1616209f416615ab37fc04ff9ce5 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 27 Jul 2016 03:50:30 -0400 Subject: [PATCH] 1596:Enhance the process of reinstall for PCM --- xCAT-server/lib/xcat/plugins/profilednodes.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/profilednodes.pm b/xCAT-server/lib/xcat/plugins/profilednodes.pm index c5458e334..d44beca15 100644 --- a/xCAT-server/lib/xcat/plugins/profilednodes.pm +++ b/xCAT-server/lib/xcat/plugins/profilednodes.pm @@ -996,8 +996,16 @@ Usage: # Add BMC/FSP as reserve NICs and not remove it form nics table foreach my $oldNic (keys %$oldNicsRef) { - if ($oldNicsRef->{$oldNic}->{'type'} ne 'BMC' and $oldNicsRef->{$oldNic}->{'type'} ne 'FSP') { - $updateNicsHash{$oldNic} = 1; + if ($oldNicsRef->{$oldNic}->{'type'} ne 'BMC' and $oldNicsRef->{$oldNic}->{'type'} ne 'FSP'){ + if ($oldNicsRef->{$oldNic}->{'network'} eq $newNicsRef->{$oldNic}->{'network'}){ + $reserveNicsHash{$oldNic} = 1; + if(exists $updateNicsHash{$oldNic}) + { + delete($updateNicsHash{$oldNic}); + } + } else { + $updateNicsHash{$oldNic} = 1; + } } else { $reserveNicsHash{$oldNic} = 1; }