Author: glen
Date: Tue Mar  3 11:05:50 2009
New Revision: 10168

Modified:
   geninitrd/trunk/geninitrd
Log:
- support for generating images on running 2.4 kernel for 2.6 kernel

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd   (original)
+++ geninitrd/trunk/geninitrd   Tue Mar  3 11:05:50 2009
@@ -266,8 +266,8 @@
        local module="$1"
        local mode="$2"
 
-       # backwards compatible, process $mode
-       local modfile=$(modinfo -k $kernel -n $module 2>/dev/null)
+       # backwards compatible, process $mode, parse aliases
+       local modfile=$(NEW_MODINFO=1 modinfo -k $kernel -n $module 2>/dev/null)
        if [ ! -f "$modfile" ]; then
                # module not found. try aliases!
                local alias aliases=$(modprobe_conf | awk -vm="$module" '$1 == 
"alias" && $2 == m { print $3 }')
@@ -298,7 +298,12 @@
 
 find_firmware() {
        local module="$1"
-       echo -n $(modinfo -k $kernel -F firmware $module 2>/dev/null | xargs)
+
+       # no firmware support in 2.4 kernels
+       if [ "$kernel_version_long" -lt "002005048" ]; then
+               return
+       fi
+       echo -n $(NEW_MODINFO=1 modinfo -k $kernel -F firmware $module 
2>/dev/null | xargs)
 }
 
 findmodule() {
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to