From 5afb716b81f174980b45127ad48f30ebb17c209e Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 1 Aug 2001 12:51:33 +0000 Subject: (new): now works with a list of partitions --- perl-install/raid.pm | 12 +++++++----- 1 file 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; } -- cgit v1.2.1