From 49c0923c10cc0473a82cca17a4eb833b456ea0f5 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 9 Sep 2008 15:41:52 +0000 Subject: - do not use UUID for software raid, only for hdx and sdx --- perl-install/fs/wild_device.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'perl-install/fs') diff --git a/perl-install/fs/wild_device.pm b/perl-install/fs/wild_device.pm index 0e10f19ab..f31390d9e 100644 --- a/perl-install/fs/wild_device.pm +++ b/perl-install/fs/wild_device.pm @@ -76,6 +76,12 @@ sub to_subpart { $part; } +sub _prefer_device_UUID { + my ($part) = @_; + $part->{prefer_device_UUID} || + !$::no_uuid_by_default && $part->{device} =~ /^(hd|sd)/; +} + sub from_part { my ($prefix, $part) = @_; @@ -83,7 +89,7 @@ sub from_part { 'LABEL=' . $part->{device_LABEL}; } elsif ($part->{device_alias}) { "/dev/$part->{device_alias}"; - } elsif (!$part->{prefer_device} && ($part->{prefer_device_UUID} || !$::no_uuid_by_default) && $part->{device_UUID}) { + } elsif (!$part->{prefer_device} && $part->{device_UUID} && _prefer_device_UUID($part)) { 'UUID=' . $part->{device_UUID}; } else { my $faked_device = exists $part->{faked_device} ? -- cgit v1.2.1