summaryrefslogtreecommitdiffstats
path: root/perl-install/fs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-11-23 12:36:44 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-11-23 12:36:44 +0000
commitaae1fb04d6757705e6985e30c5b3663bfde6968f (patch)
treeec18e86832a19ccc82929fd88894f9c6adf214dc /perl-install/fs.pm
parent6ecbd2b1462c00790c7953573ef16e7be464b3ba (diff)
downloaddrakx-aae1fb04d6757705e6985e30c5b3663bfde6968f.tar
drakx-aae1fb04d6757705e6985e30c5b3663bfde6968f.tar.gz
drakx-aae1fb04d6757705e6985e30c5b3663bfde6968f.tar.bz2
drakx-aae1fb04d6757705e6985e30c5b3663bfde6968f.tar.xz
drakx-aae1fb04d6757705e6985e30c5b3663bfde6968f.zip
fix {device_alias} containing /dev/xxx instead of xxx. The bug was
"none /mnt/cdrom supermount dev=/dev//dev/cdrom,fs=iso9660..." (bugzilla #12224)
Diffstat (limited to 'perl-install/fs.pm')
-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 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;