From 8246e13b5c13e3f7aab8817feb25fa3444007bfb Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 16 Feb 2005 09:05:17 +0000 Subject: for the real 10_1, not the 10_1-update branch --- perl-install/patch/patch-updatemodules.pl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 perl-install/patch/patch-updatemodules.pl diff --git a/perl-install/patch/patch-updatemodules.pl b/perl-install/patch/patch-updatemodules.pl new file mode 100644 index 000000000..382f8ff43 --- /dev/null +++ b/perl-install/patch/patch-updatemodules.pl @@ -0,0 +1,20 @@ +use install_steps; +package install_steps; + +log::l("updateModulesFromFloppy version needing the exact directories"); + +undef *updateModulesFromFloppy; +*updateModulesFromFloppy = sub { + my ($o) = @_; + return if $::testing; + + fs::mount(devices::make($o->{updatemodules}), "/floppy", "ext2", 0); + 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"); +}; -- cgit v1.2.1