summaryrefslogtreecommitdiffstats
path: root/perl-install/patch/patch-raidtab.pl
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/patch/patch-raidtab.pl')
-rw-r--r--perl-install/patch/patch-raidtab.pl19
1 files changed, 19 insertions, 0 deletions
diff --git a/perl-install/patch/patch-raidtab.pl b/perl-install/patch/patch-raidtab.pl
new file mode 100644
index 000000000..bd54546c8
--- /dev/null
+++ b/perl-install/patch/patch-raidtab.pl
@@ -0,0 +1,19 @@
+use detect_devices;
+package detect_devices;
+log::l("PATCHING");
+
+*raidAutoStartRaidtab = sub {
+ my (@parts) = @_;
+ log::l("patched raidAutoStartRaidtab");
+ $::isInstall or return;
+ require raid;
+ #- faking a raidtab, it seems to be working :-)))
+ #- (choosing any inactive md)
+ raid::inactivate_all();
+ foreach (@parts) {
+ my ($nb) = grep { !raid::is_active("md$_") } 0..7;
+ output("/tmp/raidtab", "raiddev /dev/md$nb\n device " . devices::make($_->{device}) . "\n");
+ run_program::run('raidstart', '-c', "/tmp/raidtab", devices::make("md$nb"));
+ }
+ unlink "/tmp/raidtab";
+};