diff options
-rw-r--r-- | perl-install/fs.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm index abc66c540..ea5bc8222 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -149,14 +149,14 @@ sub subpart_from_wild_device_name { ($part{major}, $part{minor}) = unmakedev($rdev); } - if (my $symlink = readlink("$::prefix$dev")) { - if ($symlink =~ m|^[^/]+$|) { - $part{device_alias} = $dev; - $dev = $symlink; - } - } + my $symlink = readlink("$::prefix$dev"); $dev =~ s!/(tmp|u?dev)/!!; + if ($symlink && $symlink =~ m|^[^/]+$|) { + $part{device_alias} = $dev; + $dev = $symlink; + } + if (my (undef, $part_number) = $dev =~ m!/(disc|part(\d+))$!) { $part{part_number} = $part_number if $part_number; $part{devfs_device} = $dev; |