summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-09-18 12:26:54 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-09-18 12:26:54 +0000
commit5c418b40c0ac75beb326399b31b3533271bcf48d (patch)
tree770b5d300b3bb24398ab06127519cc99e4418206 /perl-install/detect_devices.pm
parent4bf4b23ab7fc74b6465801745ca2e8a3b52a8a21 (diff)
downloaddrakx-backup-do-not-use-5c418b40c0ac75beb326399b31b3533271bcf48d.tar
drakx-backup-do-not-use-5c418b40c0ac75beb326399b31b3533271bcf48d.tar.gz
drakx-backup-do-not-use-5c418b40c0ac75beb326399b31b3533271bcf48d.tar.bz2
drakx-backup-do-not-use-5c418b40c0ac75beb326399b31b3533271bcf48d.tar.xz
drakx-backup-do-not-use-5c418b40c0ac75beb326399b31b3533271bcf48d.zip
no_comment
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 319975db3..d62999b4b 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -45,11 +45,12 @@ sub cdroms() {
my @l = grep { $_->{type} eq 'cdrom' } get();
if (my @l2 = getIDEBurners()) {
require modules;
- my $nb = first(modules::add_alias('scsi_hostadapter', 'ide-scsi') =~ /(\d*)/) + 1;
+ modules::add_alias('scsi_hostadapter', 'ide-scsi');
+ my $nb = 1 + max(-1, map { $_->{device} =~ /scd(\d+)/ } @l);
foreach my $b (@l2) {
log::l("getIDEBurners: $b");
my ($e) = grep { $_->{device} eq $b } @l or next;
- $e->{device} = "scd" . ($nb++ || 0);
+ $e->{device} = "scd" . $nb++;
}
}
@l;