SVN: geninitrd/trunk: mod-sata.sh mod-xata.sh
shadzik
shadzik at pld-linux.org
Wed Oct 20 19:07:07 CEST 2010
Author: shadzik
Date: Wed Oct 20 19:07:07 2010
New Revision: 11860
Added:
geninitrd/trunk/mod-sata.sh
- copied, changed from rev 11859, geninitrd/trunk/mod-xata.sh
Removed:
geninitrd/trunk/mod-xata.sh
Log:
- again, rename
- use only 0106 class
Copied: geninitrd/trunk/mod-sata.sh (from rev 11859, geninitrd/trunk/mod-xata.sh)
==============================================================================
--- geninitrd/trunk/mod-xata.sh (original)
+++ geninitrd/trunk/mod-sata.sh Wed Oct 20 19:07:07 2010
@@ -1,18 +1,23 @@
#!/bin/sh
#
-# geninitrd mod: autodetect
+# geninitrd mod: sata
-find_modules_xata()
+# TODO: get rid of sed/uniq
+
+find_modules_sata()
{
- debug "Finding XATA modules"
+ debug "Finding SATA modules"
if [ ! -x /sbin/lspci ]; then
warn "Failed to execute /sbin/lspci. Is pciutils package installed?"
return
fi
- for class in 0106 0101; do
- module=$(lspci -n |grep $class |sed 's/:/ /g' |while read junk junk class vendor device junk; do grep "0x0000$vendor 0x0000$device" /lib/modules/$kernel/modules.pcimap |awk '{print $1}'; done |uniq)
- find_module "$module"
- done
+ # Classes (we want only 0106)
+ # 0101 - IDE/PATA
+ # 0106 - SATA/AHCI
+ # 0107 - SAS
+ # 0100 - SCSI
+ module=$(lspci -n |grep 0106 |sed 's/:/ /g' |while read junk junk class vendor device junk; do grep "0x0000$vendor 0x0000$device" /lib/modules/$kernel/modules.pcimap |awk '{print $1}'; done |uniq)
+ find_module "$module"
}
More information about the pld-cvs-commit
mailing list