summaryrefslogtreecommitdiffstats
path: root/iutil.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2002-08-15 18:58:25 +0000
committerMike Fulbright <msf@redhat.com>2002-08-15 18:58:25 +0000
commit002d4b51481bde8857a13c97b3e436539c430a4b (patch)
tree65a8ad27960cd7e0f818b52b2b4608a0c3d94520 /iutil.py
parent7746bee71a0ccb17069feafb5908700602c9631b (diff)
downloadanaconda-002d4b51481bde8857a13c97b3e436539c430a4b.tar.gz
anaconda-002d4b51481bde8857a13c97b3e436539c430a4b.tar.xz
anaconda-002d4b51481bde8857a13c97b3e436539c430a4b.zip
add function to see if we have usbdevfs mounted or not
Diffstat (limited to 'iutil.py')
-rw-r--r--iutil.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/iutil.py b/iutil.py
index c2ae65eb5..b03fa227d 100644
--- a/iutil.py
+++ b/iutil.py
@@ -436,3 +436,25 @@ def needsEnterpriseKernel():
return rc
+#
+# scan /proc/mounts to see if we've already have USB mounted
+#
+# kernel can fall over if we mount it twice on some hw (bug #71554)
+#
+def isUSBDevFSMounted():
+ try:
+ f = open("/proc/mounts", "r")
+ lines = f.readlines()
+ f.close()
+ for l in lines:
+ if string.find(l, "usbdevfs") != -1:
+ return 1
+ except:
+ log("In isUSBMounted, failed to open /proc/mounts")
+ return 0
+
+ return 0
+
+
+
+