summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-03-07 11:34:27 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-03-07 11:34:27 +0000
commit7841bef17e69e93f67162c8a96754c55b729298b (patch)
tree719fb84b5955f2da2c2fda345b9783e444924b75 /perl-install
parentbde843e9a778eecc701063635c9462d9fb7a2265 (diff)
downloaddrakx-backup-do-not-use-7841bef17e69e93f67162c8a96754c55b729298b.tar
drakx-backup-do-not-use-7841bef17e69e93f67162c8a96754c55b729298b.tar.gz
drakx-backup-do-not-use-7841bef17e69e93f67162c8a96754c55b729298b.tar.bz2
drakx-backup-do-not-use-7841bef17e69e93f67162c8a96754c55b729298b.tar.xz
drakx-backup-do-not-use-7841bef17e69e93f67162c8a96754c55b729298b.zip
(zips__faking_ide_scsi): fix returned value in standalone
(getSCSI): don't call isFloppyOrHD for ZIPs (lowers the number of kernel error when there is no floppy)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/detect_devices.pm19
1 files changed, 9 insertions, 10 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 7da250d1e..08d864b54 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -59,8 +59,7 @@ sub cdroms__faking_ide_scsi {
}
sub zips__faking_ide_scsi {
my @l = raw_zips();
- return @l if $::isStandalone;
- if (my @l_ide = grep { $_->{interface_type} eq 'ide' } @l) {
+ if (my @l_ide = grep { $_->{interface_type} eq 'ide' && $::isInstall } @l) {
require modules;
modules::add_alias('scsi_hostadapter', 'ide-scsi');
my $nb = 1 + max(-1, map { if_($_->{device} =~ /sd(\w+)/, ord($1) - ord('a')) } getSCSI());
@@ -160,18 +159,18 @@ sub getSCSI() {
my ($id) = /^Host:.*?Id: (\d+)/ or return &$err();
$_ = <F>; my ($vendor, $model) = /^\s*Vendor:\s*(.*?)\s+Model:\s*(.*?)\s+Rev:/ or return &$err();
$_ = <F>; my ($type) = /^\s*Type:\s*(.*)/ or &$err();
- my $device;
+ my $dev = { info => "$vendor $model", id => $id, bus => 0 };
if ($type =~ /Direct-Access/) {
- $device = "sd" . chr($driveNum++ + ord('a'));
- $type = isFloppyOrHD($device);
+ $dev->{device} = "sd" . chr($driveNum++ + ord('a'));
+ $dev->{media_type} = isZipDrive($dev) ? 'hd' : isFloppyOrHD($dev->{device});
} elsif ($type =~ /Sequential-Access/) {
- $device = "st" . $tapeNum++;
- $type = 'tape';
+ $dev->{device} = "st" . $tapeNum++;
+ $dev->{media_type} = 'tape';
} elsif ($type =~ /(CD-ROM|WORM)/) {
- $device = "scd" . $cdromNum++;
- $type = 'cdrom';
+ $dev->{device} = "scd" . $cdromNum++;
+ $dev->{media_type} = 'cdrom';
}
- $device and push @drives, { device => $device, media_type => $type, info => "$vendor $model", id => $id, bus => 0 };
+ push @drives, $dev if $dev->{device};
}
get_sys_cdrom_info(@drives);
@drives;