From cfc21c9339ce1306651adf5184f9a39763d0e28f Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 13 Aug 2004 04:41:05 +0000 Subject: (device_name_to_entry) do devfs things where they should be done --- perl-install/standalone/drakupdate_fstab | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'perl-install/standalone/drakupdate_fstab') diff --git a/perl-install/standalone/drakupdate_fstab b/perl-install/standalone/drakupdate_fstab index 9a34c317d..62950def6 100755 --- a/perl-install/standalone/drakupdate_fstab +++ b/perl-install/standalone/drakupdate_fstab @@ -65,6 +65,10 @@ sub device_name_to_entry { if ((my $devfs_prefix, $nb) = $name =~ m,(.*)/(?:cd|disc|part(\d+))$,) { $e = find { $_->{devfs_prefix} eq $devfs_prefix } @l; $e->{devfs_prefix} ||= $devfs_prefix; + $e->{devfs_device} = $e->{devfs_prefix} . '/part' . $nb; + if ($e->{devfs_device} eq $name) { + $e->{prefer_devfs_name} = 1; + } } else { if ($e = find { $name eq $_->{device} } @l) { $nb = ''; @@ -75,13 +79,10 @@ sub device_name_to_entry { } if ($nb) { - $e->{devfs_device} = $e->{devfs_prefix} . '/part' . $nb; $e->{device} = ($e->{prefix} || $e->{device}) . $nb; } $e ||= {}; - if ($e->{devfs_device} eq $name) { - $e->{prefer_devfs_name} = 1; - } else { + unless ($e->{devfs_device} eq $name) { $e->{device} = $name; #- keeping the exact name given (often is the devfs name) } $e->{media_type} = 'fd' if $name =~ /fd[01]/; -- cgit v1.2.1