summaryrefslogtreecommitdiffstats
path: root/perl-install/modules.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-09-04 13:48:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-09-04 13:48:26 +0000
commit29958ca6b88d9aa9c9305a18256f8c7092114cde (patch)
treebb59dddb36082c8d629726d42911e76056fc2c85 /perl-install/modules.pm
parentb9cbb41ade40d03aa9aa970e5dadb76a816f38e7 (diff)
downloaddrakx-29958ca6b88d9aa9c9305a18256f8c7092114cde.tar
drakx-29958ca6b88d9aa9c9305a18256f8c7092114cde.tar.gz
drakx-29958ca6b88d9aa9c9305a18256f8c7092114cde.tar.bz2
drakx-29958ca6b88d9aa9c9305a18256f8c7092114cde.tar.xz
drakx-29958ca6b88d9aa9c9305a18256f8c7092114cde.zip
no_comment
Diffstat (limited to 'perl-install/modules.pm')
-rw-r--r--perl-install/modules.pm14
1 files changed, 9 insertions, 5 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 42c2a8171..5af4358dd 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -1,5 +1,6 @@
package modules;
+use strict;
use vars qw(%drivers);
use common qw(:common :file :system);
@@ -370,6 +371,12 @@ sub remove_alias($) {
0;
}
+sub when_load {
+ my ($name, $type, @options) = @_;
+ add_alias('scsi_hostadapter', $name), load('sd_mod') if $type =~ /scsi/ || $type eq $type_aliases{scsi};
+ $conf{$name}{options} = join " ", @options if @options;
+}
+
sub load {
my ($name, $type, @options) = @_;
@@ -388,10 +395,7 @@ sub load {
-d "/proc/scsi/usb" or return;
$conf{"usb-storage"}{"post-install"} = "modprobe usbkbd; modprobe keybdev";
}
- if ($type) {
- add_alias('scsi_hostadapter', $name), load('sd_mod') if $type =~ /scsi/ || $type eq $type_aliases{scsi};
- }
- $conf{$name}{options} = join " ", @options if @options;
+ when_load($name, $type, @options);
}
sub load_multi {
my $f; $f = sub { map { $f->(@{$deps{$_}}), $_ } @_ };
@@ -452,7 +456,7 @@ sub read_already_loaded() {
foreach (cat_("/proc/modules")) {
my ($name) = split;
$conf{$name}{loaded} = 1;
- push @$l, $name unless member($name, @$l);
+ when_load($name, $drivers{$name}{type});
}
}