Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Edubuntu User (http://www.linux-archive.org/edubuntu-user/)
-   -   Add noeject support to cdrom eject handling (#477887) (http://www.linux-archive.org/edubuntu-user/425132-add-noeject-support-cdrom-eject-handling-477887-a.html)

"Brian C. Lane" 09-10-2010 01:14 AM

Add noeject support to cdrom eject handling (#477887)
 
---
pyanaconda/storage/devices.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/storage/devices.py b/pyanaconda/storage/devices.py
index c5983ee..752dec8 100644
--- a/pyanaconda/storage/devices.py
+++ b/pyanaconda/storage/devices.py
@@ -108,6 +108,7 @@ import block

from errors import *
from pyanaconda.iutil import notify_kernel, numeric_type
+from pyanaconda.flags import flags
from .storage_log import log_method_call
from udev import *
from formats import get_device_format_class, getFormat, DeviceFormat
@@ -3551,6 +3552,10 @@ class OpticalDevice(StorageDevice):
if not self.exists:
raise DeviceError("device has not been created", self.name)

+ if flags.cmdline.has_key('noeject'):
+ log.info("noeject in effect, not ejecting cdrom")
+ return
+
#try to umount and close device before ejecting
self.teardown()

--
1.7.2.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 10:40 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.