use a dracut shutdown hook to eject media (#787461)
From: "Brian C. Lane" <bcl@redhat.com>
Now that we are running from the squashfs.img on the install media
we cannot eject it until shutdown.
Anacona now uses a dracut shutdown hook to handle ejecting any media
that needs to be ejected.
---
anaconda | 5 ++---
pyanaconda/installmethod.py | 8 ++++----
pyanaconda/yuminstall.py | 34 +++++++++-------------------------
3 files changed, 15 insertions(+), 32 deletions(-)
if anaconda.ksdata and not flags.imageInstall:
from pykickstart.constants import KS_SHUTDOWN, KS_WAIT, KS_REBOOT
+ from iutil import dracut_eject
if anaconda.ksdata.reboot.eject:
for drive in anaconda.storage.devicetree.devices:
if drive.type != "cdrom":
continue
-
- log.info("attempting to eject %s" % drive.path)
- drive.eject()
+ dracut_eject( drive.path )
def doMethodComplete(anaconda):
def _ejectDevice():
- # Ejecting the CD/DVD for kickstart is handled only after %post scripts
- # have been run.
+ # Ejecting the CD/DVD for kickstart is handled at the end of anaconda
if anaconda.ksdata:
return None