X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;f=kernel%2FLinux%2Fprepmod.in;fp=kernel%2FLinux%2Fprepmod.in;h=7183d2c9021e51e986b4eede59474d410164bd15;hb=aabe6d28108439f40061cf907b95351e2d9d3254;hp=2f9eb4ee1d89a6fd36e7c40816221993a521dabb;hpb=d740b5ffc4f6ca3ef7ec2834450376d2d6fd15fa;p=lufs.git diff --git a/kernel/Linux/prepmod.in b/kernel/Linux/prepmod.in index 2f9eb4e..7183d2c 100755 --- a/kernel/Linux/prepmod.in +++ b/kernel/Linux/prepmod.in @@ -156,6 +156,12 @@ else { if (build($kernel,$uname_r,$_)) { do { cluck "Failed to symlink $_"; next; } if _system "/bin/rm -rf $moduledir; /bin/mkdir -p $moduledir; /bin/ln -s $_ $moduledir/$lufs_o"; + # Check if the compiled module matches the currently running kernel. + # We may found some unspecific sources ('/usr/src/linux/'?) not matching the current kernel. + # It still may be worth to try precompiled modules and/or give suggestive error messages. + # Do not: /sbin/insmod -o lufs -p $_ 2>/dev/null + # as 2.6 insmod has no options at all. + next if _system "/sbin/rmmod lufs 2>/dev/null; /sbin/insmod $moduledir/$lufs_o 2>/dev/null"; _pass 1; } }