diff options
author | Chris Lumens <clumens@redhat.com> | 2005-02-03 18:29:57 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2005-02-03 18:29:57 +0000 |
commit | 6363aa3b7520541f7a170db4d1e4d89d07e51d32 (patch) | |
tree | b958d89902b434899f97e08b3e767a9d6bf51391 /isys | |
parent | 4c77aefd0474b408683ee73c840a593bf05873dd (diff) | |
download | anaconda-6363aa3b7520541f7a170db4d1e4d89d07e51d32.tar.gz anaconda-6363aa3b7520541f7a170db4d1e4d89d07e51d32.tar.xz anaconda-6363aa3b7520541f7a170db4d1e4d89d07e51d32.zip |
Don't try to make a device node for virtual filesystems like proc or shm.
Diffstat (limited to 'isys')
-rw-r--r-- | isys/isys.py | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/isys/isys.py b/isys/isys.py index 80a37c34f..948571ecc 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -169,17 +169,22 @@ def ddfile(file, megs, pw = None): def mount(device, location, fstype = "ext2", readOnly = 0, bindMount = 0, remount = 0): location = os.path.normpath(location) - # - # Apparently we don't need to create to create device nodes for - # a device that starts with a '/' (like '/usbdevfs'). - # We note whether or not we created a node so we can cleanup later. - # + # We don't need to create device nodes for devices that start with '/' + # (like '/usbdevfs') and also some special fake devices like 'proc'. + # First try to make a device node and if that fails, assume we can + # mount without making a device node. If that still fails, the caller + # will have to deal with the exception. + # We note whether or not we created a node so we can clean up later. createdNode = 0 if device and device != "none" and device[0] != "/": devName = "/tmp/%s" % device - makeDevInode(device, devName) - device = devName - createdNode = 1 + + try: + makeDevInode (device, devName) + device = devName + createdNode = 1 + except SystemError: + pass if mountCount.has_key(location) and mountCount[location] > 0: mountCount[location] = mountCount[location] + 1 |