summaryrefslogtreecommitdiffstats
path: root/perl-install/patch
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-09-24 17:05:17 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-09-24 17:05:17 +0000
commitb1675dff9e409b53d0275fed6afe3a761867a57c (patch)
tree666c86d0e3ece51f4941a22cf2f32968eae2892c /perl-install/patch
parent65c486b54f4a5fb47a60ada466da46c3b44e91eb (diff)
downloaddrakx-b1675dff9e409b53d0275fed6afe3a761867a57c.tar
drakx-b1675dff9e409b53d0275fed6afe3a761867a57c.tar.gz
drakx-b1675dff9e409b53d0275fed6afe3a761867a57c.tar.bz2
drakx-b1675dff9e409b53d0275fed6afe3a761867a57c.tar.xz
drakx-b1675dff9e409b53d0275fed6afe3a761867a57c.zip
also create a raidtab if it doesn't exist (occurs when / has been formatted)
Diffstat (limited to 'perl-install/patch')
-rw-r--r--perl-install/patch/patch-raidtab.pl18
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}};
+ }
+};