diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-09-11 16:27:12 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-09-11 16:27:12 +0000 |
commit | 3a6829ded0f6b8d7ebdff8aec615b134e19b8943 (patch) | |
tree | 0b3f4d2c9bc9041866eef99c69175e062c5d02c4 /perl-install/modules.pm | |
parent | 7f97982312bb72cfd186e3d9d9bf0bddffff99a3 (diff) | |
download | drakx-backup-do-not-use-3a6829ded0f6b8d7ebdff8aec615b134e19b8943.tar drakx-backup-do-not-use-3a6829ded0f6b8d7ebdff8aec615b134e19b8943.tar.gz drakx-backup-do-not-use-3a6829ded0f6b8d7ebdff8aec615b134e19b8943.tar.bz2 drakx-backup-do-not-use-3a6829ded0f6b8d7ebdff8aec615b134e19b8943.tar.xz drakx-backup-do-not-use-3a6829ded0f6b8d7ebdff8aec615b134e19b8943.zip |
no_comment
Diffstat (limited to 'perl-install/modules.pm')
-rw-r--r-- | perl-install/modules.pm | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm index 3ed7e24fc..d2b1c7684 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -3,7 +3,7 @@ package modules; use strict; use vars qw(%drivers); -use common qw(:common :file :system); +use common qw(:common :file :system :functional); use detect_devices; use run_program; use log; @@ -394,13 +394,17 @@ sub remove_alias($) { sub when_load { my ($name, $type, @options) = @_; - add_alias('scsi_hostadapter', $name), eval { load('sd_mod') } if $type =~ /scsi/ || $type eq $type_aliases{scsi}; + if ($type =~ /scsi/ || $type eq $type_aliases{scsi}) { + add_alias('scsi_hostadapter', $name), eval { load('sd_mod') }; + } $conf{$name}{options} = join " ", @options if @options; } sub load { my ($name, $type, @options) = @_; + my @netdev = detect_devices::getNet() if $type eq 'net'; + if ($::testing) { log::l("i try to install $name module (@options)"); } elsif ($::live) { @@ -413,6 +417,10 @@ sub load { } sleep 2 if $name =~ /usb-storage|mousedev/; + if ($type eq 'net') { + add_alias($_, $name) foreach difference2([ detect_devices::getNet() ], \@netdev); + } + when_load($name, $type, @options); } sub load_multi { @@ -524,9 +532,6 @@ sub write_conf { my $written = read_conf($file); - my %net = detect_devices::net2module(); - while (my ($k, $v) = each %net) { add_alias($k, $v) } - local *F; open F, ">> $file" or die("cannot write module config file $file: $!\n"); while (my ($mod, $h) = each %conf) { |