summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-01-21 09:24:54 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-01-21 09:24:54 +0000
commit55bdc695897f95ce1aa0be0ec7a5ea81c6bd2491 (patch)
tree08c72414bf210c9e2ae48460c5027e33b75eedc8 /perl-install
parent5271d9afe318fabc3eb7e5bdb0602dea57f02500 (diff)
downloaddrakx-55bdc695897f95ce1aa0be0ec7a5ea81c6bd2491.tar
drakx-55bdc695897f95ce1aa0be0ec7a5ea81c6bd2491.tar.gz
drakx-55bdc695897f95ce1aa0be0ec7a5ea81c6bd2491.tar.bz2
drakx-55bdc695897f95ce1aa0be0ec7a5ea81c6bd2491.tar.xz
drakx-55bdc695897f95ce1aa0be0ec7a5ea81c6bd2491.zip
- don't write /etc/mdadm.conf when no raid
- use option "auto=yes" in mdadm.conf to ensure mdadm will create /dev/mdX devices when needed (those are not there when using udev and neither kernel raid autostart nor initrd created the raid)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/raid.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/raid.pm b/perl-install/raid.pm
index de74f55ef..4b4cb8109 100644
--- a/perl-install/raid.pm
+++ b/perl-install/raid.pm
@@ -221,11 +221,13 @@ sub inactivate_all() {
sub prepare_prefixed {
my ($raids) = @_;
+ @$raids or return;
+
my @devices = uniq(map { devices::make($_->{device}) } map { @{$_->{disks}} } @$raids);
output("$::prefix/etc/mdadm.conf",
join(' ', 'DEVICE', @devices) . "\n",
- map { "ARRAY " . devices::make($_->{device}) . " UUID=" . $_->{UUID} . "\n" } @$raids);
+ map { "ARRAY " . devices::make($_->{device}) . " UUID=$_->{UUID} auto=yes\n" } @$raids);
}
sub get_md_info {