Author: arighi
Date: 2007-03-25 05:53:57 -0500 (Sun, 25 Mar 2007)
New Revision: 3996
Modified:
trunk/lib/SystemImager/UseYourOwnKernel.pm
Log:
- fix: correctly retrieve module filenames for UYOK in SLES9 distro
In some versions of module-init-tools is not possible to get the
filename of a module using the 'modinfo -F <module_name>' command. The
workaround consists to use 'modprobe -l <module_name>' if the result of
modinfo is empty.
Modified: trunk/lib/SystemImager/UseYourOwnKernel.pm
===================================================================
--- trunk/lib/SystemImager/UseYourOwnKernel.pm 2007-03-22 15:01:51 UTC (rev 3995)
+++ trunk/lib/SystemImager/UseYourOwnKernel.pm 2007-03-25 10:53:57 UTC (rev 3996)
@@ -582,6 +582,9 @@
if ($?) {
print STDERR qq(WARNING: Couldn't find module "$module" (skipping it)!\n);
next;
+ } elsif ($module_file eq '') {
+ # try to get the filename using "modprobe -l".
+ chomp($module_file = `modprobe -l $module`);
}
push (@modules, $module_file);
}
|