summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-11-23 12:53:42 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-11-23 12:53:42 +0000
commitc59821e2c2d7ece43b1dcaf51877539ea255f6ca (patch)
tree596b0549fd11fce6072625dc7a394dea9c88bb73 /perl-install
parentbfa06476cd92031f7843fa66391d5f190038375a (diff)
downloaddrakx-backup-do-not-use-c59821e2c2d7ece43b1dcaf51877539ea255f6ca.tar
drakx-backup-do-not-use-c59821e2c2d7ece43b1dcaf51877539ea255f6ca.tar.gz
drakx-backup-do-not-use-c59821e2c2d7ece43b1dcaf51877539ea255f6ca.tar.bz2
drakx-backup-do-not-use-c59821e2c2d7ece43b1dcaf51877539ea255f6ca.tar.xz
drakx-backup-do-not-use-c59821e2c2d7ece43b1dcaf51877539ea255f6ca.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')
-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;