diff options
Diffstat (limited to 'perl-install/patch/patch-raidtab.pl')
-rw-r--r-- | perl-install/patch/patch-raidtab.pl | 18 |
1 files changed, 18 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}}; + } +}; |