In dispatch.py (version not sure but RHEL5/CentOS5) order is ("methodcomplete", doMethodComplete, ), ("dopostaction", doPostAction, ), It was previously up until the RHEL 5 beta ("dopostaction", doPostAction, ), ("methodcomplete", doMethodComplete, ), This means the cd is ejected before the %post section is run meaning there is no access to any files on the CD!!
This will be fixed in rawhide and in a future update release of RHEL5. Thanks for the bug report.
is it now fixed? I've just looked inside the dispatch.py and dopostaction() is still after methodcomplete()
This will be fixed in RHEL5.2.
thanks for the information I will patch and rebuild anaconda until then.
The issue is still present in RHEL5.2. What's going on?
It seems that the doMethodComplete function checks if the ks option was among the boot parameters and only ejects the CD/DVD if anaconda is not kickstarted. In installmethod.py: # This handles any cleanup needed for the method. It occurs *very* late # and is mainly used for unmounting media and ejecting the CD. If we're on # a kickstart install, don't eject the CD since there's a command to do that # if the user wants. def doMethodComplete(anaconda): anaconda.method.filesDone() if not anaconda.isKickstart: anaconda.method.ejectCD() I haven't tried yet.
OK, I should have noticed this bug is related strictly to the CD *eject*. My issue is with the unmounting /mnt/source before %post (performed unconditionally in filesDone()). While it is obviously possible to remount, it's an unnecessary hassle when dealing with media-agnostic scripts (we need to support CDROM & NFS kickstarts). It's actually easier to keep the mount point busy and cause the umount command to fail, but I would rather have a clean solution instead of playing such games with anaconda. Is there any good reason for unmounting /mnt/source before %post?