summaryrefslogtreecommitdiffstats
path: root/perl-install/modules.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-01-18 21:07:15 +0000
committerThierry Vignaud <tv@mageia.org>2013-01-18 21:07:15 +0000
commitee67c3fa110848a0e44f903b32929f0406a3b00f (patch)
tree20b1a9ca3f0dafd41a970b5b34559c61e975d491 /perl-install/modules.pm
parent77cc98bddde7b3ebcfcb8cb02e6fe642b1cce4d9 (diff)
downloaddrakx-ee67c3fa110848a0e44f903b32929f0406a3b00f.tar
drakx-ee67c3fa110848a0e44f903b32929f0406a3b00f.tar.gz
drakx-ee67c3fa110848a0e44f903b32929f0406a3b00f.tar.bz2
drakx-ee67c3fa110848a0e44f903b32929f0406a3b00f.tar.xz
drakx-ee67c3fa110848a0e44f903b32929f0406a3b00f.zip
use modprobe instead of insmod (mga#8676)
Diffstat (limited to 'perl-install/modules.pm')
-rw-r--r--perl-install/modules.pm49
1 files changed, 0 insertions, 49 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 3cbe942b0..76343578c 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -90,8 +90,6 @@ sub load_raw {
if ($::testing || $::local_install) {
log::l("i would load module $_ ($h_options->{$_})") foreach @$l;
- } elsif ($::isInstall) {
- load_raw_install($l, $h_options);
} else {
run_program::run('/sbin/modprobe', $_, split(' ', $h_options->{$_}))
or !run_program::run('/sbin/modprobe', '-n', $_) #- ignore missing modules
@@ -305,51 +303,4 @@ sub when_load_category {
}
}
-#-###############################################################################
-#- isInstall functions
-#-###############################################################################
-sub module_extension() { ".ko" }
-
-sub extract_modules {
- my ($dir, @modules) = @_;
- map {
- my $modname = $_;
- my $path = list_modules::modname2path($modname);
- my $f = $modname . module_extension();
- if (-e $path) {
- system("gzip -dc $path > $dir/$f 2>/dev/null") == 0
- or system("xz -d < $path > $dir/$f") == 0
- or unlink "$dir/$f";
- } else {
- log::l("warning: unable to get module filename for $modname (path: $path)");
- }
- "$dir/$f";
- } @modules;
-}
-
-sub load_raw_install {
- my ($l, $options) = @_;
-
- extract_modules('/tmp', @$l);
- my @failed = grep {
- my $m = '/tmp/' . $_ . module_extension();
- if (-e $m) {
- my $stdout;
- my $rc = run_program::run('/sbin/insmod', '2>', \$stdout, $m, split(' ', $options->{$_}));
- log::l(chomp_($stdout)) if $stdout;
- # if whether we succeeded or module is already loaded:
- if ($rc || $stdout =~ /: -1 File exists/) {
- unlink $m;
- '';
- }
- } else {
- log::l("missing module $_");
- 'error';
- }
- } @$l;
-
- die "insmod'ing module " . join(", ", @failed) . " failed" if @failed;
-
-}
-
1;