summaryrefslogtreecommitdiffstats
path: root/perl-install/fs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-05-01 12:17:45 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-05-01 12:17:45 +0000
commitc12e1ed0e54193a0b287a14544e65bd6d81702a3 (patch)
tree2ac0578db8bc24017fbf4ecb69cdd61eea278400 /perl-install/fs.pm
parent8d98b670beb5e850987b4c3aa108bdc71a3d7189 (diff)
downloaddrakx-c12e1ed0e54193a0b287a14544e65bd6d81702a3.tar
drakx-c12e1ed0e54193a0b287a14544e65bd6d81702a3.tar.gz
drakx-c12e1ed0e54193a0b287a14544e65bd6d81702a3.tar.bz2
drakx-c12e1ed0e54193a0b287a14544e65bd6d81702a3.tar.xz
drakx-c12e1ed0e54193a0b287a14544e65bd6d81702a3.zip
fix drakupdate_fstab adding twice an entry in fstab, one with the old name, one with the devfs name
Diffstat (limited to 'perl-install/fs.pm')
-rw-r--r--perl-install/fs.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 3adce3cea..ab0822ddb 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -89,6 +89,11 @@ sub read_fstab {
} else {
$h->{device} = $dev;
}
+
+ if ($h->{device} =~ m!/(disc|part\d+)$!) {
+ $h->{devfs_device} = $h->{device};
+ $h->{prefer_devfs_name} = 1;
+ }
}
if ($h->{options} =~ /credentials=/ && !member('verbatim_credentials', @reading_options)) {
@@ -214,7 +219,7 @@ sub prepare_write_fstab {
my $device =
isLoopback($_) ?
($_->{mntpoint} eq '/' ? "/initrd/loopfs" : $_->{loopback_device}{mntpoint}) . $_->{loopback_file} :
- part2device($o_prefix, $_->{device}, $_->{type});
+ part2device($o_prefix, $_->{prefer_devfs_name} ? $_->{devfs_device} : $_->{device}, $_->{type});
my $real_mntpoint = $_->{mntpoint} || ${{ '/tmp/hdimage' => '/mnt/hd' }}{$_->{real_mntpoint}};
mkdir_p("$o_prefix$real_mntpoint") if $real_mntpoint =~ m|^/|;