diff options
-rw-r--r-- | mdk-stage1/doc/UPDATEMODULES | 7 | ||||
-rw-r--r-- | perl-install/install_steps.pm | 39 |
2 files changed, 11 insertions, 35 deletions
diff --git a/mdk-stage1/doc/UPDATEMODULES b/mdk-stage1/doc/UPDATEMODULES index 5fbdb6991..4dc6a6c90 100644 --- a/mdk-stage1/doc/UPDATEMODULES +++ b/mdk-stage1/doc/UPDATEMODULES @@ -61,8 +61,11 @@ msdos ppa # ISA network card needing options ne io=0x300 irq=7 -[root@obiwan mnt]# ls floppy/2.6.8.1-20mdk -msdos.ko.gz ppa.ko.gz uhci.ko.gz wacom.ko.gz +[root@obiwan mnt]# (cd floppy/2.6.8.1-20mdk ; find -type f) +./kernel/fs/msdos/msdos.ko.gz +./kernel/drivers/scsi/ppa.ko.gz +./kernel/drivers/usb/host/uhci-hcd.ko.gz +./kernel/drivers/usb/input/wacom.ko.gz [root@obiwan mnt]# --=----=----=----=----=----=----=----=----=-- diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 3f44f9963..338c3f420 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -624,39 +624,12 @@ sub updateModulesFromFloppy { return if $::testing; fs::mount($o->{updatemodules}, "/floppy", "ext2", 0); - foreach (glob_("$o->{prefix}/lib/modules/*")) { - my ($kernelVersion) = m,lib/modules/(\S*),; - log::l("examining updated modules for kernel $kernelVersion"); - if (-d "/floppy/$kernelVersion") { - my @src_files = glob_("/floppy/$kernelVersion/*"); - 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!([^/\.]*\.k?o)(\.gz|\.bz2)?$!; - my $qsfile = quotemeta $sfile; - my $qsext = quotemeta $sext; - foreach my $target (@dest_files) { - $target =~ /$qsfile/ or next; - $target = "$o->{prefix}/$target"; - eval { cp_af($s, $target) }; - if ($@) { - log::l("updating module $target by $s failed: $@"); - } else { - log::l("updating module $target by $s"); - } - if ($target !~ /$qsfile$qsext$/) { - #- extension differ, first rename target file correctly, - #- then uncompress source file, then compress it as expected. - my ($basetarget, $text) = $target =~ /(.*?)(\.gz|\.bz2)$/; - rename $target, "$basetarget$sext"; - $sext eq '.gz' and run_program::run("gzip", "-d", "$basetarget$sext"); - $sext eq '.bz2' and run_program::run("bzip2", "-d", "$basetarget$sext"); - $text eq '.gz' and run_program::run("gzip", $basetarget); - $text eq '.bz2' and run_program::run("bzip2", $basetarget); - } - } - } - } + foreach my $kernel_version (all("$::prefix/lib/modules")) { + log::l("examining updated modules for kernel $kernel_version"); + -d "/floppy/$kernel_version" or next; + log::l("found updatable modules"); + run_program::run("cd /floppy/$kernel_version ; find -type f | cpio -pdu $::prefix/lib/modules/$kernel_version"); + run_program::rooted($::prefix, 'depmod', '-a', '-F', "/boot/System.map-$kernel_version", $kernel_version); } fs::umount("/floppy"); } |