diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/patch/patch-raidtab.pl | 18 | ||||
-rw-r--r-- | perl-install/raid.pm | 2 |
2 files changed, 20 insertions, 0 deletions
diff --git a/perl-install/patch/patch-raidtab.pl b/perl-install/patch/patch-raidtab.pl index bd54546c8..de03a1b2a 100644 --- a/perl-install/patch/patch-raidtab.pl +++ b/perl-install/patch/patch-raidtab.pl @@ -17,3 +17,21 @@ log::l("PATCHING"); } unlink "/tmp/raidtab"; }; + +use raid; +package raid; + +*prepare_prefixed = sub { + my ($raids, $prefix) = @_; + + log::l("patched prepare_prefixed"); + + $raids or return; + + &write($raids, "/etc/raidtab") if ! -e "/etc/raidtab"; + + eval { cp_af("/etc/raidtab", "$prefix/etc/raidtab") }; + foreach (grep { $_ } @$raids) { + devices::make("$prefix/dev/$_->{device}") foreach @{$_->{disks}}; + } +}; diff --git a/perl-install/raid.pm b/perl-install/raid.pm index 492225ceb..048de72f1 100644 --- a/perl-install/raid.pm +++ b/perl-install/raid.pm @@ -158,6 +158,8 @@ sub prepare_prefixed { my ($raids, $prefix) = @_; $raids or return; + &write($raids, "/etc/raidtab") if ! -e "/etc/raidtab"; + eval { cp_af("/etc/raidtab", "$prefix/etc/raidtab") }; foreach (grep { $_ } @$raids) { devices::make("$prefix/dev/$_->{device}") foreach @{$_->{disks}}; |