summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2005-02-03 18:29:57 +0000
committerChris Lumens <clumens@redhat.com>2005-02-03 18:29:57 +0000
commit6363aa3b7520541f7a170db4d1e4d89d07e51d32 (patch)
treeb958d89902b434899f97e08b3e767a9d6bf51391
parent4c77aefd0474b408683ee73c840a593bf05873dd (diff)
downloadanaconda-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.
-rw-r--r--ChangeLog5
-rw-r--r--isys/isys.py21
2 files changed, 18 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index a62c9e1ec..279c5aa39 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-03 Chris Lumens <clumens@redhat.com>
+
+ * isys/isys.py (mount): Don't try to make a device node for virtual
+ filesystems like proc or shm.
+
2005-02-02 Jeremy Katz <katzj@redhat.com>
* anaconda.spec: Bump version.
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