diff options
author | Olivier Blin <oblin@mandriva.org> | 2004-08-13 04:44:11 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2004-08-13 04:44:11 +0000 |
commit | 4e043553ad75438a87848ae3a905d9cc0f1e480d (patch) | |
tree | 7eda0dc237f172d4ee68bff6adaae037459bd47b /perl-install/standalone/drakupdate_fstab | |
parent | 9efb2630cbffd771153c030c5dfacadcd8c2ce48 (diff) | |
download | drakx-backup-do-not-use-4e043553ad75438a87848ae3a905d9cc0f1e480d.tar drakx-backup-do-not-use-4e043553ad75438a87848ae3a905d9cc0f1e480d.tar.gz drakx-backup-do-not-use-4e043553ad75438a87848ae3a905d9cc0f1e480d.tar.bz2 drakx-backup-do-not-use-4e043553ad75438a87848ae3a905d9cc0f1e480d.tar.xz drakx-backup-do-not-use-4e043553ad75438a87848ae3a905d9cc0f1e480d.zip |
(device_name_to_entry) define $nb locally
Diffstat (limited to 'perl-install/standalone/drakupdate_fstab')
-rwxr-xr-x | perl-install/standalone/drakupdate_fstab | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/perl-install/standalone/drakupdate_fstab b/perl-install/standalone/drakupdate_fstab index 2a14ed91b..3b7bd9abf 100755 --- a/perl-install/standalone/drakupdate_fstab +++ b/perl-install/standalone/drakupdate_fstab @@ -61,8 +61,8 @@ sub device_name_to_entry { $name =~ /fd[01]/ && !$::auto and return { device => $name }; my @l = detect_devices::get(); - my ($e, $nb); - if ((my $devfs_prefix, $nb) = $name =~ m,(.*)/(?:cd|disc|part(\d+))$,) { + my $e; + 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; @@ -70,10 +70,8 @@ sub device_name_to_entry { $e->{prefer_devfs_name} = 1; } } else { - if ($e = find { $name eq $_->{device} } @l) { - $nb = ''; - } else { - (my $prefix, $nb) = $name =~ m/^(.*?)(\d*)$/; + unless ($e = find { $name eq $_->{device} } @l) { + my ($prefix, $nb) = $name =~ m/^(.*?)(\d*)$/; $e = find { $prefix eq ($_->{prefix} || $_->{device}) } @l; $e->{device} = ($e->{prefix} || $e->{device}) . $nb; } |