summaryrefslogtreecommitdiffstats
path: root/perl-install/patch
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-02-16 09:05:17 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-02-16 09:05:17 +0000
commit8246e13b5c13e3f7aab8817feb25fa3444007bfb (patch)
treeb712c63d915f715ade6a4e6c5d5cc43051fbf212 /perl-install/patch
parent6dfda867e98e57b5ff9daf3842425042c7b2cda6 (diff)
downloaddrakx-8246e13b5c13e3f7aab8817feb25fa3444007bfb.tar
drakx-8246e13b5c13e3f7aab8817feb25fa3444007bfb.tar.gz
drakx-8246e13b5c13e3f7aab8817feb25fa3444007bfb.tar.bz2
drakx-8246e13b5c13e3f7aab8817feb25fa3444007bfb.tar.xz
drakx-8246e13b5c13e3f7aab8817feb25fa3444007bfb.zip
for the real 10_1, not the 10_1-update branch
Diffstat (limited to 'perl-install/patch')
-rw-r--r--perl-install/patch/patch-updatemodules.pl20
1 files changed, 20 insertions, 0 deletions
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");
+};