From 65c486b54f4a5fb47a60ada466da46c3b44e91eb Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 24 Sep 2002 16:53:12 +0000 Subject: fix raidAutoStartRaidtab crushing /etc/raidtab --- perl-install/patch/patch-raidtab.pl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 perl-install/patch/patch-raidtab.pl (limited to 'perl-install') 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"; +}; -- cgit v1.2.1