diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-01-20 11:49:48 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-01-20 11:49:48 +0000 |
commit | faa9a76e3bbe293893a7ad95ffb8a43199f9bc6d (patch) | |
tree | 9dbf910ea0e5e4edebed5f84c5392ba85b574da9 | |
parent | e50ad50a237e6c636a018494c4419e5708020dd0 (diff) | |
download | drakx-faa9a76e3bbe293893a7ad95ffb8a43199f9bc6d.tar drakx-faa9a76e3bbe293893a7ad95ffb8a43199f9bc6d.tar.gz drakx-faa9a76e3bbe293893a7ad95ffb8a43199f9bc6d.tar.bz2 drakx-faa9a76e3bbe293893a7ad95ffb8a43199f9bc6d.tar.xz drakx-faa9a76e3bbe293893a7ad95ffb8a43199f9bc6d.zip |
kernel 2.6 .ko adaptation
-rw-r--r-- | perl-install/install_steps.pm | 2 | ||||
-rw-r--r-- | perl-install/modules.pm | 12 | ||||
-rw-r--r-- | perl-install/modules/parameters.pm | 3 |
3 files changed, 12 insertions, 5 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 5d0b6ff94..20b9649dc 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -575,7 +575,7 @@ sub updateModulesFromFloppy { my @dest_files = map { chomp_($_) } run_program::rooted_get_stdout($o->{prefix}, 'find', '/lib/modules'); foreach my $s (@src_files) { log::l("found updatable module $s"); - my ($sfile, $sext) = $s =~ m!([^/\.]*\.o)(?:\.gz|\.bz2)?$!; + my ($sfile, $sext) = $s =~ m!([^/\.]*\.k?o)(?:\.gz|\.bz2)?$!; my $qsfile = quotemeta $sfile; my $qsext = quotemeta $sext; foreach my $target (@dest_files) { diff --git a/perl-install/modules.pm b/perl-install/modules.pm index c4e6186ae..8252057ce 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -360,6 +360,13 @@ sub read_already_loaded() { when_load($_) foreach reverse loaded_modules(); } +my $module_extension = c::kernel_version() =~ /^\Q2.4/ ? 'o' : 'ko'; + +sub name2file { + my ($name) = @_; + "$name.$module_extension"; +} + sub when_load { my ($name, @options) = @_; @@ -402,7 +409,8 @@ sub extract_modules { eval { require packdrake; my $packer = new packdrake($cz, quiet => 1); - $packer->extract_archive($dir, map { "$_.o" } @modules); + $packer->extract_archive($dir, map { name2file($_) } @modules); + map { $dir . '/' . name2file($_) } @modules; }; } @@ -411,7 +419,7 @@ sub load_raw { extract_modules('/tmp', map { $_->[0] } @l); my @failed = grep { - my $m = "/tmp/$_->[0].o"; + my $m = '/tmp/' . name2file($_->[0]); if (-e $m && run_program::run(["/usr/bin/insmod_", "insmod"], '2>', '/dev/tty5', $m, @{$_->[1]})) { unlink $m; ''; diff --git a/perl-install/modules/parameters.pm b/perl-install/modules/parameters.pm index f480ca31a..d6338f8e1 100644 --- a/perl-install/modules/parameters.pm +++ b/perl-install/modules/parameters.pm @@ -14,8 +14,7 @@ sub parameters { my ($module) = @_; if (!$::isStandalone && !$::testing) { - modules::extract_modules('/tmp', $module); - $module = "/tmp/$module.o"; + ($module) = modules::extract_modules('/tmp', $module); } my @parameters; |