Author: shadzik
Date: Wed Oct 20 16:56:55 2010
New Revision: 11853

Added:
   geninitrd/trunk/mod-autodetect.sh
Modified:
   geninitrd/trunk/geninitrd
Log:
- when PREMODS are not set, try to autodetect xata/scsi modules


Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd   (original)
+++ geninitrd/trunk/geninitrd   Wed Oct 20 16:56:55 2010
@@ -1107,6 +1107,10 @@
 
 cache_modprobe_conf
 
+if [ -z "$PREMODS" ]; then
+       autodetect_xata
+fi
+
 for n in $PREMODS; do
        find_module "$n"
 done

Added: geninitrd/trunk/mod-autodetect.sh
==============================================================================
--- (empty file)
+++ geninitrd/trunk/mod-autodetect.sh   Wed Oct 20 16:56:55 2010
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+autodetect_xata()
+{
+       debug "Detecting modules"
+
+       for class in 0106 0107 0100 0101; do
+               PREMODS="$PREMODS $(lspci -n |grep $class |sed 's/:/ /g' |while 
read junk junk class vendor device junk; do grep "0x0000$vendor 0x0000$device" 
/lib/modules/$(uname -r)/modules.pcimap |awk '{print $1}'; done |uniq)"
+       done
+}
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to