-Be more specific about locating a module (if their is any ambiguity in the fs structure, drivers failed to load)

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4070 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2009-09-01 18:02:44 +00:00
parent 6f457f0685
commit 6e81a3ce2c

View File

@ -23,7 +23,7 @@ do
PCI=$(echo $i | awk -F% '{print $1}')
VID="0x0000$(echo $i | awk -F% '{print $2}' |awk -F: '{print $1}')"
DID="0x0000$(echo $i | awk -F% '{print $2}' |awk -F: '{print $2}')"
if egrep "^[^ ]*[ ]*$VID[ ]*$DID" /lib/modules/*/modules.pcimap >/dev/null
if egrep "^[^ ]*[ ]*$VID[ ]*$DID" /lib/modules/`uname -r`/modules.pcimap >/dev/null
then
TYPE=$(
lspci | \
@ -38,7 +38,7 @@ do
sed 's/^ *//'
)
MOD=$(
egrep "^[^ ]*[ ]*$VID[ ]*$DID" /lib/modules/*/modules.pcimap | \
egrep "^[^ ]*[ ]*$VID[ ]*$DID" /lib/modules/`uname -r`/modules.pcimap | \
head -1 | \
awk '{print $1}' | \
tr -d '"'