By default, cdrom is ejected unless "eject_cdrom" : false is present
Change-Id: Ied85c13f5c3761822cfae7113bc1d85919199ac8
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2860
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Xiaolin Li <xiaolinl@vmware.com>
... | ... |
@@ -234,10 +234,14 @@ class Installer(object): |
234 | 234 |
if self.iso_installer: |
235 | 235 |
self.progress_bar.hide() |
236 | 236 |
self.window.addstr(0, 0, 'Congratulations, Photon has been installed in {0} secs.\n\nPress any key to continue to boot...'.format(self.progress_bar.time_elapsed)) |
237 |
+ eject_cdrom = True |
|
237 | 238 |
if self.ks_config == None: |
238 | 239 |
self.window.content_window().getch() |
239 |
- process = subprocess.Popen(['eject', '-r'], stdout=self.output) |
|
240 |
- process.wait() |
|
240 |
+ if 'eject_cdrom' in self.install_config and not self.install_config['eject_cdrom']: |
|
241 |
+ eject_cdrom = False |
|
242 |
+ if eject_cdrom: |
|
243 |
+ process = subprocess.Popen(['eject', '-r'], stdout=self.output) |
|
244 |
+ process.wait() |
|
241 | 245 |
return ActionResult(True, None) |
242 | 246 |
|
243 | 247 |
def copy_rpms(self): |