<br><div><span class="gmail_quote">On 9/1/06, <b class="gmail_sendername">Edward F. Brown</b> <<a href="mailto:ebrown@lanl.gov">ebrown@lanl.gov</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
But what if it provided a hook: you still have to<br>check for errors within %post, but if you could then pass a string to an<br>anaconda-provided function that would display the message and provide a<br>shell-prompt window. This could work for text or graphical mode, with any
<br>interpreter, and would not require the explicit tty switch in %post.<br>Obviously I'm not a python or anaconda developer either, but could this be<br>hard to implement?  Turn it off (function call ignored), (or conversely,
<br>on), with a kickstart option.<br></blockquote></div><br>Agreed, depending on your level of comfort with python, something like this should<br>be pretty easy to patch in.  If you have a chance to pull down the anaconda 
src.rpm, check<br>out kickstart.py.  The Script class would probably be where this hook would be implemented<br>It already grabs the return code, so it should be pretty easy to come up with<br>a scheme of return codes that would allow %post scripters to utilize this functionality.
<br><br>Current code...<br><br>...[snip]...<br><br>        rc = iutil.execWithRedirect(self.interp,<br>                                    [self.interp,"/tmp/ks-script"],<br>                                    stdout = messages, stderr = messages,
<br>                                    root = scriptRoot)<br><br>        if rc != 0:<br>            log("WARNING - Error code %s encountered running a kickstart %%pre/%%post script", rc)<br>...[snip]...<br><br>
Additional if statements could be built in to allow what you are proposing.  Then just leave the<br>final else to do the log.  The class also writes the %pre and %post to /tmp/ks-script<br>(or /mnt/sysimage/tmp/ks-script for chroot), so you could have the opportunity to update it on
<br>the fly and have it re run.<br><br>If you'd like to work on this, I'd be happy to help.  I just don't have a test bed to use.  We'd probably<br>also want to run this by the anaconda-devel list to see this would even be something that could end
<br>up being accepted.<br><br>-Jeremy, RHCE<br>