diff options
author | Chris Lumens <clumens@redhat.com> | 2008-08-04 11:43:01 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2008-08-04 15:48:17 -0400 |
commit | 7d5f82a950268a38d8af59921f4d9658e65af886 (patch) | |
tree | 982ec69f6fd0849287f13beb7f195c23999530b0 /installmethod.py | |
parent | 0288ad4cdb14ccf576fc7df719862badc7f57702 (diff) | |
download | anaconda-7d5f82a950268a38d8af59921f4d9658e65af886.tar.gz anaconda-7d5f82a950268a38d8af59921f4d9658e65af886.tar.xz anaconda-7d5f82a950268a38d8af59921f4d9658e65af886.zip |
Eject the CD/DVD if we booted off a boot.iso as well (#442088).
Diffstat (limited to 'installmethod.py')
-rw-r--r-- | installmethod.py | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/installmethod.py b/installmethod.py index 77f4a39e3..b69225bc0 100644 --- a/installmethod.py +++ b/installmethod.py @@ -27,10 +27,24 @@ log = logging.getLogger("anaconda") import isys, product def doMethodComplete(anaconda): - anaconda.backend.complete(anaconda) + def _ejectDevice(): + # Ejecting the CD/DVD for kickstart is handled only after %post scripts + # have been run. + if anaconda.isKickstart: + return None + + if anaconda.mediaDevice: + return anaconda.mediaDevice - if not anaconda.isKickstart and anaconda.mediaDevice: - isys.ejectCdrom(anaconda.mediaDevice) + # If we booted off the boot.iso instead of disc 1, eject that as well. + if anaconda.stage2.startswith("cdrom://"): + dev = anaconda.stage2[8:].split(':')[0] + return dev + + anaconda.backend.complete(anaconda) + dev = _ejectDevice() + if dev: + isys.ejectCdrom(dev) mtab = "/dev/root / ext3 ro 0 0\n" for ent in anaconda.id.fsset.entries: |