diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/modules.pm | 49 | ||||
-rw-r--r-- | perl-install/modules/parameters.pm | 4 |
3 files changed, 1 insertions, 54 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index aa6c39bbe..023aa4265 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,4 +1,4 @@ -- load 'crc32c' module for XFS too (mga#8676) +- use modprobe instead of insmod (mga#8676) Version 15.19 - 14 January 2013 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; diff --git a/perl-install/modules/parameters.pm b/perl-install/modules/parameters.pm index 2a6d9df8f..6f77bad79 100644 --- a/perl-install/modules/parameters.pm +++ b/perl-install/modules/parameters.pm @@ -13,10 +13,6 @@ use modules; sub parameters { my ($module) = @_; - if (!$::isStandalone && !$::testing) { - ($module) = modules::extract_modules('/tmp', $module); - } - map { chomp; (my $name, $_) = /(\w+):(.*)/s or warn "modules::parameters::parameters($module): unknown line\n"; |