summaryrefslogtreecommitdiffstats
path: root/perl-install/modules.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-08-28 21:16:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-08-28 21:16:32 +0000
commitff872004f6d5f202a6a8cd418bad3b2458d2ed66 (patch)
tree984a3ea576f9090b2aad069550b65a6595c04d4c /perl-install/modules.pm
parentc047aee8e84b723f6910defab8b0de8063502490 (diff)
downloaddrakx-ff872004f6d5f202a6a8cd418bad3b2458d2ed66.tar
drakx-ff872004f6d5f202a6a8cd418bad3b2458d2ed66.tar.gz
drakx-ff872004f6d5f202a6a8cd418bad3b2458d2ed66.tar.bz2
drakx-ff872004f6d5f202a6a8cd418bad3b2458d2ed66.tar.xz
drakx-ff872004f6d5f202a6a8cd418bad3b2458d2ed66.zip
no_comment
Diffstat (limited to 'perl-install/modules.pm')
-rw-r--r--perl-install/modules.pm25
1 files changed, 15 insertions, 10 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index c2075f453..1b14a02fb 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -344,7 +344,7 @@ sub get_options {
$conf{$name}{options};
}
-sub add_alias($$) {
+sub add_alias {
my ($alias, $name) = @_;
$name =~ /ignore/ and return;
/\Q$alias/ && $conf{$_}{alias} && $conf{$_}{alias} eq $name and return $_ foreach keys %conf;
@@ -354,6 +354,9 @@ sub add_alias($$) {
if ($name =~ /^snd-card-/) {
$conf{$name}{"post-install"} = "modprobe snd-pcm-oss";
}
+ if ($alias eq 'scsi_hostadapter') {
+ add_alias('block-major-11', $alias);
+ }
$alias;
}
@@ -383,6 +386,7 @@ sub load {
if ($name eq "usb-storage") {
sleep(2);
-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};
@@ -428,6 +432,8 @@ sub load_raw {
}
} @l;
+ die "insmod'ing module " . join(", ", map { $_->[0] } @failed) . " failed" if @failed;
+
foreach (@l) {
if ($_->[0] eq "parport_pc") {
#- this is a hack to make plip go
@@ -440,7 +446,6 @@ sub load_raw {
load_multi("usbkbd", "keybdev");
}
}
- die "insmod'ing module " . join(", ", map { $_->[0] } @failed) . " failed" if @failed;
}
sub read_already_loaded() {
@@ -474,7 +479,6 @@ sub read_conf($;$) {
}
#- cheating here: not handling aliases of aliases
while (my ($k, $v) = each %c) {
-#- $$scsi ||= $v->{scsi_hostadapter} if $scsi;
if (my $a = $v->{alias}) {
local $c{$a}{alias};
add2hash($c{$a}, $v);
@@ -489,7 +493,7 @@ sub write_conf {
my $file = "$prefix/etc/modules.conf";
rename "$prefix/etc/conf.modules", $file; #- make the switch to new name if needed
- #- remove the post-install supermount stuff. We may have to add some more
+ #- remove the post-install supermount stuff. We now do it in /etc/modules
substInFile { $_ = '' if /^post-install supermount/ } $file;
my $written = read_conf($file);
@@ -497,12 +501,6 @@ sub write_conf {
my %net = detect_devices::net2module();
while (my ($k, $v) = each %net) { add_alias($k, $v) }
- my @l = sort grep { $conf{$_}{alias} && /scsi_hostadapter/ } keys %conf;
- add_alias('block-major-11', 'scsi_hostadapter') if @l;
- push @l, "ide-floppy" if detect_devices::ide_zips();
- $conf{supermount}{"post-install"} = join " ; ", map { "modprobe $_" } @l if @l;
- $conf{"usb-storage"}{"post-install"} = "modprobe usbkbd; modprobe keybdev" if @l && arch() !~ /sparc|alpha/;
-
local *F;
open F, ">> $file" or die("cannot write module config file $file: $!\n");
while (my ($mod, $h) = each %conf) {
@@ -510,6 +508,13 @@ sub write_conf {
print F "$type $mod $v2\n" if $v2 && $type ne "loaded" && !$written->{$mod}{$type};
}
}
+ my @l = map { "scsi_hostadapter$_\n" } '', 1..$scsi-1 if $scsi;
+ push @l, "ide-floppy" if detect_devices::ide_zips();
+
+ substInFile {
+ $_ = '' if /^scsi_hostadapter/;
+ $_ = join '', @l if eof;
+ } "$prefix/etc/modules";
}
sub read_stage1_conf {