summaryrefslogtreecommitdiffstats
path: root/perl-install/modules.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/modules.pm')
-rw-r--r--perl-install/modules.pm68
1 files changed, 5 insertions, 63 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 6014c6dc6..6e448a916 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -1,4 +1,4 @@
-package modules; # $Id: modules.pm 269880 2010-06-04 14:01:44Z pterjan $
+package modules;
use strict;
@@ -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
@@ -111,8 +109,8 @@ sub load_with_options {
my @l = map {
if_(member($_, 'plip', @parallel_zip_modules), 'parport_pc'),
if_($_ eq 'vfat', 'nls_cp437', 'nls_iso8859_1'),
- if_($_ eq 'btrfs', 'crc32c', 'crc32c-intel'),
- dependencies_closure(cond_mapping_24_26($_));
+ if_(member($_, qw(btrfs xfs)), 'crc32c', 'crc32c-intel'),
+ cond_mapping_24_26($_);
} @$l;
@l = filter_out_loaded_modules(@l) or return;
@@ -129,7 +127,7 @@ sub load {
sub load_and_configure {
my ($conf, $module, $o_options) = @_;
- my @l = filter_out_loaded_modules(dependencies_closure(cond_mapping_24_26($module)));
+ my @l = filter_out_loaded_modules(cond_mapping_24_26($module));
load_raw(\@l, { cond_mapping_24_26($module) => $o_options });
if (member($module, @parallel_zip_modules)
@@ -159,13 +157,6 @@ sub load_category {
if_($category =~ /scsi/,
if_(detect_devices::usbStorage(), 'usb_storage'),
),
- arch() =~ /ppc/ ? (
- if_($category =~ /scsi/,
- if_(detect_devices::has_mesh(), 'mesh'),
- if_(detect_devices::has_53c94(), 'mac53c94'),
- ),
- if_($category =~ /net/, 'bmac', 'gmac', 'mace', 'airport'),
- ) : (),
);
my @l = (
(map {
@@ -190,8 +181,6 @@ sub load_category {
sub load_parallel_zip {
my ($conf) = @_;
- arch() !~ /ppc/ or return;
-
grep {
eval { load_and_configure($conf, $_); 1 };
} @parallel_zip_modules;
@@ -277,7 +266,7 @@ sub when_load_category {
if ($category =~ m,disk/ide,) {
$conf->add_probeall('ide-controller', $name);
eval { load('ide_gd_mod') };
- } elsif ($category =~ m,disk/(scsi|hardware_raid|sata|firewire),) {
+ } elsif ($category =~ m,disk/(scsi|hardware_raid|sata|firewire|virtual),) {
$conf->add_probeall('scsi_hostadapter', $name);
eval { load('sd_mod') };
} elsif ($category eq 'bus/usb') {
@@ -300,51 +289,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;