summaryrefslogtreecommitdiffstats
path: root/perl-install/modules.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-07-08 03:38:13 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-07-08 03:38:13 +0000
commit5bf5886d579f214ac0c7d8d6f301c56cfb9d3651 (patch)
treecf7f61fd551b7214f5efc0c9b054bd524339fd8f /perl-install/modules.pm
parent456e9f45a23678f2610a08f3b0e68dde159d956b (diff)
downloaddrakx-backup-do-not-use-5bf5886d579f214ac0c7d8d6f301c56cfb9d3651.tar
drakx-backup-do-not-use-5bf5886d579f214ac0c7d8d6f301c56cfb9d3651.tar.gz
drakx-backup-do-not-use-5bf5886d579f214ac0c7d8d6f301c56cfb9d3651.tar.bz2
drakx-backup-do-not-use-5bf5886d579f214ac0c7d8d6f301c56cfb9d3651.tar.xz
drakx-backup-do-not-use-5bf5886d579f214ac0c7d8d6f301c56cfb9d3651.zip
rename load_raw() to load_raw_install() and change the prototype
Diffstat (limited to 'perl-install/modules.pm')
-rw-r--r--perl-install/modules.pm18
1 files changed, 9 insertions, 9 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 76f219eb7..dfdc52cee 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -82,7 +82,7 @@ sub load {
or !run_program::run('/sbin/modprobe', '-n', $_) #- ignore missing modules
or die "insmod'ing module $_ failed" foreach @l;
} else {
- load_raw(map { [ $_ => $options{$_} ] } @l);
+ load_raw_install(\@l, \%options);
}
sleep 2 if any { /^(usb-storage|mousedev|printer)$/ } @l;
@@ -449,15 +449,15 @@ sub extract_modules {
};
}
-sub load_raw {
- my @l = @_;
+sub load_raw_install {
+ my ($l, $options) = @_;
- extract_modules('/tmp', map { $_->[0] } @l);
+ extract_modules('/tmp', @$l);
my @failed = grep {
- my $m = '/tmp/' . name2file($_->[0]);
+ my $m = '/tmp/' . name2file($_);
if (-e $m) {
my $stdout;
- my $rc = run_program::run(["/usr/bin/insmod_", "insmod"], '2>', \$stdout, $m, @{$_->[1]});
+ my $rc = run_program::run(["/usr/bin/insmod_", "insmod"], '2>', \$stdout, $m, @{$options->{$_}});
log::l(chomp_($stdout)) if $stdout;
if ($rc) {
unlink $m;
@@ -466,12 +466,12 @@ sub load_raw {
'error';
}
} else {
- log::l("missing module $_->[0]");
+ log::l("missing module $_");
'error';
}
- } @l;
+ } @$l;
- die "insmod'ing module " . join(", ", map { $_->[0] } @failed) . " failed" if @failed;
+ die "insmod'ing module " . join(", ", @failed) . " failed" if @failed;
}