From 0693a2aaae97799ed7f9667d2fbc464b772b1863 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Sat, 4 Oct 2008 14:40:05 +0000 Subject: [PATCH] -Change FRU rewrite to replace old xCAT signatures instead of preserving git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2283 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/ipmi.pm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index 7693dfa7d..02afc72a3 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -2247,17 +2247,13 @@ sub buildprodfru { push @bytes,transfieldtobytes($prod->{asset}); push @bytes,transfieldtobytes($prod->{fruid}); push @bytes,transfieldtobytes($prod->{fruid}); - my $foundsig=0; foreach (@{$prod->{extra}}) { - push @bytes,transfieldtobytes($_); my $sig=getascii(transfieldtobytes($_)); - if ($sig =~ /FRU by xCAT/) { - $foundsig = 1; + unless ($sig and $sig =~ /FRU by xCAT/) { + push @bytes,transfieldtobytes($_); } } - unless ($foundsig) { - push @bytes,transfieldtobytes({encoding=>3,value=>"$currnode FRU by xCAT ".xCAT::Utils::Version('short')}); - } + push @bytes,transfieldtobytes({encoding=>3,value=>"$currnode FRU by xCAT ".xCAT::Utils::Version('short')}); push @bytes,(0xc1); $bytes[1]=ceil((scalar(@bytes)+1)/8); $padsize=(ceil((scalar(@bytes)+1)/8)*8)-scalar(@bytes)-1;