summaryrefslogtreecommitdiffstats
path: root/pcmcia.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2001-01-08 19:43:14 +0000
committerErik Troan <ewt@redhat.com>2001-01-08 19:43:14 +0000
commit59e6bf48a1bc882b90413df36f0ef30f8aeea1b9 (patch)
treed54d07b3549aabab2f836c2f4588e6725dd06b4f /pcmcia.py
parentb0fbcd6a577badf6a63dc3b254586e34a8957eb2 (diff)
downloadanaconda-59e6bf48a1bc882b90413df36f0ef30f8aeea1b9.tar.gz
anaconda-59e6bf48a1bc882b90413df36f0ef30f8aeea1b9.tar.xz
anaconda-59e6bf48a1bc882b90413df36f0ef30f8aeea1b9.zip
need to be able to detect pcmcia controller existence to know if laptop
installs should be the default
Diffstat (limited to 'pcmcia.py')
-rwxr-xr-xpcmcia.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/pcmcia.py b/pcmcia.py
index 785b10dba..99d9b6bcc 100755
--- a/pcmcia.py
+++ b/pcmcia.py
@@ -1,6 +1,21 @@
#!/usr/bin/python
-import iutil, string, os, kudzu
+import iutil, string, os
+
+def hasPcmcia(test = 0):
+ loc = "/sbin/probe"
+ if not os.access(loc, os.X_OK):
+ loc = "/usr/sbin/probe"
+
+ try:
+ result = iutil.execWithCapture(loc, [ loc ])
+ except RuntimeError:
+ return None
+
+ if (string.find(result, "TCIC-2 probe: not found") != -1):
+ return None
+
+ return 1
def createPcmciaConfig(path, pcic, test = 0):
f = open(path, "w")