summaryrefslogtreecommitdiffstats
path: root/perl-install/patch/patch-raidtab.pl
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-09-24 16:53:12 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-09-24 16:53:12 +0000
commit65c486b54f4a5fb47a60ada466da46c3b44e91eb (patch)
treeaad0448937eac24bc44f6acff9470ac4dd1c8749 /perl-install/patch/patch-raidtab.pl
parentf4dce0dfba4e343e481ce2f9c983ce89345128a4 (diff)
downloaddrakx-65c486b54f4a5fb47a60ada466da46c3b44e91eb.tar
drakx-65c486b54f4a5fb47a60ada466da46c3b44e91eb.tar.gz
drakx-65c486b54f4a5fb47a60ada466da46c3b44e91eb.tar.bz2
drakx-65c486b54f4a5fb47a60ada466da46c3b44e91eb.tar.xz
drakx-65c486b54f4a5fb47a60ada466da46c3b44e91eb.zip
fix raidAutoStartRaidtab crushing /etc/raidtab
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";
+};