# Miscellaneous
op.add_option("--module", action="append", default=[])
@@ -783,6 +784,9 @@ if __name__ == "__main__":
if opts.iscsi:
flags.iscsi = 1
+ if opts.noeject:
+ flags.noeject = True
+
if opts.targetArch:
flags.targetarch = opts.targetArch
diff --git a/flags.py b/flags.py
index 702a30d..e01ec63 100644
--- a/flags.py
+++ b/flags.py
@@ -94,6 +94,7 @@ class Flags:
self.__dict__['flags']['sshd'] = 0
self.__dict__['flags']['noverifyssl'] = False
self.__dict__['flags']['preexisting_x11'] = False
+ self.__dict__['flags']['noeject'] = False
# for non-physical consoles like some ppc and sgi altix,
# we need to preserve the console device and not try to
# do things like bogl on them. this preserves what that
diff --git a/storage/devices.py b/storage/devices.py
index 2a243d2..61082be 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -109,6 +109,7 @@ import block
from errors import *
from iutil import notify_kernel, numeric_type
+from flags import flags
from .storage_log import log_method_call
from udev import *
from formats import get_device_format_class, getFormat, DeviceFormat
@@ -3605,6 +3606,10 @@ class OpticalDevice(StorageDevice):
#try to umount and close device before ejecting
self.teardown()
+ if flags.noeject:
+ log.info("noeject in effect, not ejecting cdrom")
+ return
+
# 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)
--
1.7.3.4
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list