diff options
Diffstat (limited to 'perl-install/raid.pm')
-rw-r--r-- | perl-install/raid.pm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/perl-install/raid.pm b/perl-install/raid.pm index 356a69ecb..eedd121a6 100644 --- a/perl-install/raid.pm +++ b/perl-install/raid.pm @@ -19,12 +19,14 @@ sub nb($) { first((ref $nb ? $nb->{device} : $nb) =~ /(\d+)/); } -sub new($$) { - my ($raid, $part) = @_; +sub new { + my ($raid, @parts) = @_; my $nb = @$raid; - $raid->[$nb] = { 'chunk-size' => "64k", type => 0x83, disks => [ $part ], device => "md$nb", notFormatted => 1 }; - $part->{raid} = $nb; - delete $part->{mntpoint}; + $raid->[$nb] = { 'chunk-size' => "64k", type => 0x83, disks => [ @parts ], device => "md$nb", notFormatted => 1 }; + foreach my $part (@parts) { + $part->{raid} = $nb; + delete $part->{mntpoint}; + } $nb; } |