summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-10-29 16:49:30 +0000
committerJeremy Katz <katzj@redhat.com>2003-10-29 16:49:30 +0000
commit04bc15364233ecefe5881ce8e2b42d8d6a3f1cee (patch)
tree2fad11fe90c93ca8213c37c666ae42a81fda5cae
parent0763908b9b34383a071f33706c52bee9b90e089c (diff)
downloadanaconda-04bc15364233ecefe5881ce8e2b42d8d6a3f1cee.tar.gz
anaconda-04bc15364233ecefe5881ce8e2b42d8d6a3f1cee.tar.xz
anaconda-04bc15364233ecefe5881ce8e2b42d8d6a3f1cee.zip
backport pcmcia probing from HEAD that uses kudzu instead of parsing
the output of /sbin/probe. fixes misdetection of pcmcia controllers on hp servers (#105614)
-rwxr-xr-xpcmcia.py29
1 files changed, 9 insertions, 20 deletions
diff --git a/pcmcia.py b/pcmcia.py
index 97e5a7c60..f5f8da559 100755
--- a/pcmcia.py
+++ b/pcmcia.py
@@ -14,34 +14,23 @@
#
import iutil, string, os, kudzu
+from rhpl.log import log
def pcicType(test = 0):
devs = kudzu.probe(kudzu.CLASS_SOCKET, kudzu.BUS_PCI, 0)
if devs:
+ log("Found a pcic controller of type: yenta_socket")
return "yenta_socket"
- loc = "/sbin/probe"
- if not os.access(loc, os.X_OK):
- loc = "/usr/sbin/probe"
+ # lets look for non-PCI socket controllers now
+ devs = kudzu.probe(kudzu.CLASS_SOCKET, kudzu.BUS_MISC, 0)
- try:
- result = iutil.execWithCapture(loc, [ loc ])
- except RuntimeError:
- return None
+ if devs and devs[0].driver not in ["ignore", "unknown", "disabled"]:
+ log("Found a pcic controller of type: %s", devs[0].driver)
+ return devs[0].driver
-
- # VERY VERY BAD - we're depending on the output of /sbin/probe
- # to guess the PCMCIA controller. Output has changed over the
- # years and this tries to catch cases we know of
- if (string.find(result, "TCIC-2 probe: not found") != -1):
- return None
- elif (string.find(result, "TCIC-2") != -1):
- if (string.find(result, "not") == -1):
- return "tcic"
- else:
- return None
-
- return "i82365"
+ log("No pcic controller detected")
+ return None
def createPcmciaConfig(path, test = 0):
f = open(path, "w")