diff options
Diffstat (limited to 'perl-install/modules.pm')
-rw-r--r-- | perl-install/modules.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm index c82cee6a1..734523fcb 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -379,6 +379,19 @@ sub load { } $conf{$name}{options} = join " ", @options if @options; } +sub load_multi { + my $f; $f = sub { map { $f->(@{$deps{$_}}), $_ } @_ }; + my %l; my @l = + grep { !$conf{$_}{loaded} } + grep { my $o = $l{$_}; $l{$_} = 1; !$o } + $f->(@_); + + $::testing and log::l("i would install modules @l"), return; + + run_program::run("extract_archive", "/lib/modules.cz2", "/tmp", map { "$_.o" } @l); + run_program::run(["insmod_", "insmod"], "/tmp/$_.o") and $conf{$_}{loaded} = 1 foreach @l; + unlink map { "/tmp/$_.o" } @l; +} sub unload($;$) { my ($m, $remove_alias) = @_; |