summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-09-17 23:06:47 +0000
committerOlivier Blin <oblin@mandriva.org>2005-09-17 23:06:47 +0000
commitc63acf5f11efa9b74a8f87fea7ae548c55cb44bd (patch)
treeed08fdf9a1c3358e6201bfe3cecba824439a08b7 /perl-install
parentcf4d9875492f41768ab03f1b0ec39a913776cac0 (diff)
downloaddrakx-backup-do-not-use-c63acf5f11efa9b74a8f87fea7ae548c55cb44bd.tar
drakx-backup-do-not-use-c63acf5f11efa9b74a8f87fea7ae548c55cb44bd.tar.gz
drakx-backup-do-not-use-c63acf5f11efa9b74a8f87fea7ae548c55cb44bd.tar.bz2
drakx-backup-do-not-use-c63acf5f11efa9b74a8f87fea7ae548c55cb44bd.tar.xz
drakx-backup-do-not-use-c63acf5f11efa9b74a8f87fea7ae548c55cb44bd.zip
add sr_mod in modprobe.preload if needed (#18641)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/detect_devices.pm2
-rw-r--r--perl-install/modules.pm1
2 files changed, 3 insertions, 0 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index da30a9533..b03785f6e 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -283,6 +283,8 @@ sub getSCSI_26() {
# (see linux/include/scsi/scsi.h and sans-find-scanner.1)
my $raw_type = $scsi_types[$get->('type')];
$media_type ||= 'scanner' if $raw_type =~ /Scanner|Processor/;
+ # if sr_mod isn't loaded, the block device may not be created yet
+ $media_type ||= 'cdrom' if $raw_type eq "CD-ROM";
{ info => $get->('vendor') . ' ' . $get->('model'), host => $host, channel => $channel, id => $id, lun => $lun,
bus => 'SCSI', media_type => $media_type, device => $device,
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index dc7783659..aa1358498 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -200,6 +200,7 @@ sub write_preload_conf {
push @l, map { $_->{driver} } probe_category($_) foreach qw(multimedia/dvb multimedia/tv various/laptop input/joystick various/crypto);
push @l, 'padlock' if cat_("/proc/cpuinfo") =~ /rng_en/;
push @l, 'evdev' if detect_devices::getSynapticsTouchpads();
+ push @l, 'sr_mod' if any { $_->{media_type} eq 'cdrom' } detect_devices::getSCSI();
my @l_26 = @l;
push @l_26, map { $_->{driver} } probe_category('various/agpgart');
append_to_modules_loaded_at_startup("$::prefix/etc/modules", @l);