On 12/10/2009 12:24 AM, Mark Hamzy wrote: > Display reIPL information before a reboot so that the user knows > which partition the 390 will reboot into. This can help diagnose > an error if the 390 will mistakenly reboot into a different partition > than expected. It also conveniently displays reboot information > rather than relying on the user know the correct place to get the > information out of. > > --- > anaconda | 2 ++ > gui.py | 1 + > iutil.py | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 65 insertions(+), 0 deletions(-) > > diff --git a/anaconda b/anaconda > index 78e5fd1..1b2cf64 100755 > --- a/anaconda > +++ b/anaconda > @@ -1052,6 +1052,8 @@ if __name__ == "__main__": > log.info("attempting to eject %s" % drive.path) > drive.eject() > > + iutil.dumpReIPLFiles () > + > del anaconda.intf > > # vim:tw=78:ts=4:et:sw=4 > diff --git a/gui.py b/gui.py > index 4379bec..e1753e3 100755 > --- a/gui.py > +++ b/gui.py > @@ -1324,6 +1324,7 @@ class InstallControlWindow: > takeScreenShot() > > def _doExit (self, *args): > + iutil.dumpReIPLFiles () > gtk.main_quit() > os._exit(0) > Can anyone please confirm that those two places are really the only ones where anaconda may exit for a (successful) installation? If there will be a global exit handler with Chris' reboot rework, then we could trigger an lsreipl there. > diff --git a/iutil.py b/iutil.py > index 39d398a..da97256 100644 > --- a/iutil.py > +++ b/iutil.py > @@ -38,6 +38,11 @@ _ = lambda x: gettext.ldgettext("anaconda", x) > import logging > log = logging.getLogger("anaconda") > > +tty3_handler = logging.FileHandler("/dev/tty3") > +reIPL_log = logging.getLogger("reIPL") > +reIPL_log.addHandler(tty3_handler) > +reIPL_log.setLevel(logging.INFO) > + > #Python reimplementation of the shell tee process, so we can > #feed the pipe output into two places at the same time > class tee(threading.Thread): > @@ -1014,6 +1019,63 @@ def reIPL(anaconda, loader_pid): > # or a two-item list with errorMessage and rebootInstr (=> shutdown) > return message > > +def stringFileContents (filename): > +def dumpReIPLFiles (): Instead of letting anaconda interpret the current reipl settings, I now realized that we have lsreipl from s390utils in stage2 (and even stage1 since dae98456cac25415bb05464138a52b583aaebb2b). This tool gets maintained and will be adapted should the reipl interface change. Calling this existing tool might make life easier, if it provides all the output you intended to get. > def resetRpmDb(rootdir): > for rpmfile in glob.glob("%s/var/lib/rpm/__db.*" % rootdir): > try: > -- > 1.6.4.4 Steffen Linux on System z Development IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list