diff options
author | Mike Fulbright <msf@redhat.com> | 2002-08-15 18:58:25 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2002-08-15 18:58:25 +0000 |
commit | 002d4b51481bde8857a13c97b3e436539c430a4b (patch) | |
tree | 65a8ad27960cd7e0f818b52b2b4608a0c3d94520 /iutil.py | |
parent | 7746bee71a0ccb17069feafb5908700602c9631b (diff) | |
download | anaconda-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.py | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -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 + + + + |