summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/fs.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 4771068e1..90cc772e0 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;