-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
This commit is contained in:
jbjohnso 2008-10-04 14:40:05 +00:00
parent bb0c55378d
commit 0693a2aaae

View File

@ -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;