summaryrefslogtreecommitdiffstats
path: root/perl-install/diskdrake
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2020-11-20 18:08:07 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2020-11-20 18:08:27 +0100
commit1d9733c24dd47a44fcc73b772acecebf36202b82 (patch)
tree9dcd9bf7589f44f4dd34381a14171b656f79f73b /perl-install/diskdrake
parentebec524bc5de98909a32af40e07f906b635865ca (diff)
downloaddrakx-18.35.tar
drakx-18.35.tar.gz
drakx-18.35.tar.bz2
drakx-18.35.tar.xz
drakx-18.35.zip
18.3518.35
Diffstat (limited to 'perl-install/diskdrake')
0 files changed, 0 insertions, 0 deletions
2'>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;