diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/install2.pm | 10 | ||||
-rw-r--r-- | perl-install/modules.pm | 9 |
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/; |