From 55bdc695897f95ce1aa0be0ec7a5ea81c6bd2491 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 21 Jan 2005 09:24:54 +0000 Subject: - 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) --- perl-install/raid.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'perl-install/raid.pm') 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 { -- cgit v1.2.1