summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-02-13 16:13:03 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-02-13 16:13:03 +0000
commitf9d539b8d50b5608e6e02e1ea7b613bb487d1043 (patch)
treed814544729758a23bec1c3528ea8de19a30e8a41
parent762cb4be621d9db7c51dee6bace5553decd32282 (diff)
downloaddrakx-f9d539b8d50b5608e6e02e1ea7b613bb487d1043.tar
drakx-f9d539b8d50b5608e6e02e1ea7b613bb487d1043.tar.gz
drakx-f9d539b8d50b5608e6e02e1ea7b613bb487d1043.tar.bz2
drakx-f9d539b8d50b5608e6e02e1ea7b613bb487d1043.tar.xz
drakx-f9d539b8d50b5608e6e02e1ea7b613bb487d1043.zip
- have usb-storage as a scsi_hostadapter by default
- remove it if unneeded for normal boot (cf comment in the code)
-rw-r--r--perl-install/install2.pm10
-rw-r--r--perl-install/modules.pm9
2 files changed, 18 insertions, 1 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 7783c7238..bfd6b5229 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -191,6 +191,16 @@ sub formatPartitions {
any::rotate_logs($o->{prefix});
+ if (find { $_->{usb_media_type} && find { $_->{mntpoint} } partition_table::get_normal_parts($_) } @{$o->{all_hds}{hds}}) {
+ log::l("we use a usb-storage based drive, so keep it as a normal scsi_hostadapter");
+ } else {
+ log::l("we don't need usb-storage for booting system, rely on hotplug");
+ #- when usb-storage is in scsi_hostadapter,
+ #- hotplug + scsimon do not load sd_mod/sr_mod when needed
+ #- (eg: when plugging a usb key)
+ modules::remove_probeall('scsi_hostadapter', 'usb-storage');
+ }
+
require raid;
raid::prepare_prefixed($o->{all_hds}{raids}, $o->{prefix});
}
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 952a5d375..52df91fad 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -189,6 +189,13 @@ sub add_probeall {
@$l = uniq(@$l, $module);
log::l("setting probeall $alias to @$l");
}
+sub remove_probeall {
+ my ($alias, $module) = @_;
+
+ my $l = $conf{$alias}{probeall} ||= [];
+ @$l = grep { $_ ne $module } @$l;
+ log::l("setting probeall $alias to @$l");
+}
sub remove_alias($) {
my ($name) = @_;
@@ -409,7 +416,7 @@ sub when_load {
if (my $category = module2category($name)) {
if ($category =~ m,disk/(scsi|hardware_raid|usb|firewire),) {
- add_probeall('scsi_hostadapter', $name) if $name ne 'usb-storage';
+ add_probeall('scsi_hostadapter', $name);
eval { load('sd_mod') };
}
add_alias('sound-slot-0', $name) if $category =~ /sound/;