summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2009-07-17 09:56:24 +0200
committerMartin Sivak <msivak@redhat.com>2009-07-17 17:10:50 +0200
commit6dc159708058136522c9ec2f62287a1d0c22f0a4 (patch)
treebef46a9fe5976878190fe86fddb74d3f5fbefb30 /storage
parentd246f6197499f9f300ac458e7705799d442b5bd7 (diff)
downloadanaconda-6dc159708058136522c9ec2f62287a1d0c22f0a4.tar.gz
anaconda-6dc159708058136522c9ec2f62287a1d0c22f0a4.tar.xz
anaconda-6dc159708058136522c9ec2f62287a1d0c22f0a4.zip
Stop the cdrom device before ejecting (#505067)
Diffstat (limited to 'storage')
-rw-r--r--storage/devices.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/devices.py b/storage/devices.py
index 02c694581..5bfd31ffd 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -2993,6 +2993,9 @@ class OpticalDevice(StorageDevice):
if not self.exists:
raise DeviceError("device has not been created", self.path)
+ #try to umount and close device before ejecting
+ self.teardown()
+
# Make a best effort attempt to do the eject. If it fails, it's not
# critical.
fd = os.open(self.path, os.O_RDONLY | os.O_NONBLOCK)