diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-02-16 09:05:17 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-02-16 09:05:17 +0000 |
commit | 8246e13b5c13e3f7aab8817feb25fa3444007bfb (patch) | |
tree | b712c63d915f715ade6a4e6c5d5cc43051fbf212 | |
parent | 6dfda867e98e57b5ff9daf3842425042c7b2cda6 (diff) | |
download | drakx-backup-do-not-use-8246e13b5c13e3f7aab8817feb25fa3444007bfb.tar drakx-backup-do-not-use-8246e13b5c13e3f7aab8817feb25fa3444007bfb.tar.gz drakx-backup-do-not-use-8246e13b5c13e3f7aab8817feb25fa3444007bfb.tar.bz2 drakx-backup-do-not-use-8246e13b5c13e3f7aab8817feb25fa3444007bfb.tar.xz drakx-backup-do-not-use-8246e13b5c13e3f7aab8817feb25fa3444007bfb.zip |
for the real 10_1, not the 10_1-update branch
-rw-r--r-- | perl-install/patch/patch-updatemodules.pl | 20 |
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"); +}; |