From bc184c28974dfa435242ff04b610c5f9fe4e4404 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 29 Jun 2004 13:18:04 +0000 Subject: use fsedit::is_same_hd in drakupdate_fstab and revert previous change in fs::subpart_from_wild_device_name (do not fill both devfs_device and device fields) --- perl-install/fs.pm | 4 ++-- perl-install/standalone/drakupdate_fstab | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'perl-install') diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 6093b005e..35399d3be 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -152,8 +152,8 @@ sub subpart_from_wild_device_name { } $dev =~ s!/(tmp|dev)/!!; - $part{device} = $dev; - $part{devfs_device} = $dev if $dev =~ m!/(disc|part\d+)$!; + my $is_devfs = $dev =~ m!/(disc|part\d+)$!; + $part{$is_devfs ? 'devfs_device' : 'device'} = $dev; return \%part; } else { log::l("part_from_wild_device_name: unknown device $dev"); diff --git a/perl-install/standalone/drakupdate_fstab b/perl-install/standalone/drakupdate_fstab index c911f7055..b645b7d56 100755 --- a/perl-install/standalone/drakupdate_fstab +++ b/perl-install/standalone/drakupdate_fstab @@ -132,7 +132,7 @@ sub main { } my $fstab = [ fs::read_fstab('', '/etc/fstab', 'keep_freq_passno', 'keep_devfs_name', 'verbatim_credentials') ]; - my ($existing_fstab_entries, $fstab_) = partition { $_->{device} eq $part->{device} || $_->{device} eq $part->{devfs_device} } @$fstab; + my ($existing_fstab_entries, $fstab_) = partition { fsedit::is_same_hd($_, $part) } @$fstab; if ($action eq 'add') { if (@$existing_fstab_entries) { -- cgit v1.2.1