diff options
author | Matt Wilson <msw@redhat.com> | 2000-07-14 22:56:27 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2000-07-14 22:56:27 +0000 |
commit | fd32ff8fa637758bc4d3da64de0b2927125bf850 (patch) | |
tree | b05b12f460561378fa2eb1e674046e0c1a99cc47 /todo.py | |
parent | f25a5fd0d4278b9cd5ae7c0dc6174fef906e710d (diff) | |
download | anaconda-fd32ff8fa637758bc4d3da64de0b2927125bf850.tar.gz anaconda-fd32ff8fa637758bc4d3da64de0b2927125bf850.tar.xz anaconda-fd32ff8fa637758bc4d3da64de0b2927125bf850.zip |
put all of post-install configuration in a try:..finally: block so we can pop the window. This fixes a deadlock with exception handling in GUI during post install config
Diffstat (limited to 'todo.py')
-rw-r--r-- | todo.py | 202 |
1 files changed, 103 insertions, 99 deletions
@@ -1542,113 +1542,117 @@ class ToDo: w = self.intf.waitWindow(_("Post Install"), _("Performing post install configuration...")) - if not self.upgrade: - self.createCdrom() - - self.fstab.addMount(self.fdDevice, "/mnt/floppy", "auto") - if self.fdDevice[0:2] == "fd": - self.createRemovable("ls-120", mntDirRoot = "ls120") - - self.createRemovable("zip", partNum = 4) - self.createRemovable("jaz", partNum = 4) - - self.copyExtraModules() - self.fstab.write (self.instPath) - self.writeConfiguration () - self.writeDesktop () - if (self.instClass.defaultRunlevel): - self.initlevel = self.instClass.defaultRunlevel - self.setDefaultRunlevel () - - # pcmcia is supported only on i386 at the moment - if arch == "i386": - pcmcia.createPcmciaConfig(self.instPath + "/etc/sysconfig/pcmcia") - self.copyConfModules () - if not self.x.skip and self.x.server: - if os.access (self.instPath + "/etc/X11/X", os.R_OK): - os.rename (self.instPath + "/etc/X11/X", - self.instPath + "/etc/X11/X.rpmsave") - try: - os.unlink (self.instPath + "/etc/X11/X") - except OSError: - pass - os.symlink ("../../usr/X11R6/bin/" + self.x.server, - self.instPath + "/etc/X11/X") + try: + if not self.upgrade: + self.createCdrom() + + self.fstab.addMount(self.fdDevice, "/mnt/floppy", "auto") + if self.fdDevice[0:2] == "fd": + self.createRemovable("ls-120", mntDirRoot = "ls120") + + self.createRemovable("zip", partNum = 4) + self.createRemovable("jaz", partNum = 4) + + self.copyExtraModules() + self.fstab.write (self.instPath) + self.writeConfiguration () + self.writeDesktop () + if (self.instClass.defaultRunlevel): + self.initlevel = self.instClass.defaultRunlevel + self.setDefaultRunlevel () + + # pcmcia is supported only on i386 at the moment + if arch == "i386": + pcmcia.createPcmciaConfig(self.instPath + "/etc/sysconfig/pcmcia") + self.copyConfModules () + if not self.x.skip and self.x.server: + if os.access (self.instPath + "/etc/X11/X", os.R_OK): + os.rename (self.instPath + "/etc/X11/X", + self.instPath + "/etc/X11/X.rpmsave") + try: + os.unlink (self.instPath + "/etc/X11/X") + except OSError: + pass + os.symlink ("../../usr/X11R6/bin/" + self.x.server, + self.instPath + "/etc/X11/X") - self.x.write (self.instPath + "/etc/X11") - self.setDefaultRunlevel () + self.x.write (self.instPath + "/etc/X11") + self.setDefaultRunlevel () - # blah. If we're on a serial mouse, and we have X, we need to - # close the mouse device, then run kudzu, then open it again. + # blah. If we're on a serial mouse, and we have X, we need to + # close the mouse device, then run kudzu, then open it again. - # turn it off - mousedev = None + # turn it off + mousedev = None - # XXX currently Bad Things (X async reply) happen when doing - # Mouse Magic on Sparc (Mach64, specificly) - if os.environ.has_key ("DISPLAY") and not arch == "sparc": - import xmouse - try: - mousedev = xmouse.get()[0] - except RuntimeError: - pass - if mousedev: - try: - os.rename (mousedev, "/dev/disablemouse") - except OSError: - pass - try: - xmouse.reopen() - except RuntimeError: - pass - argv = [ "/usr/sbin/kudzu", "-q" ] - devnull = os.open("/dev/null", os.O_RDWR) - iutil.execWithRedirect(argv[0], argv, root = self.instPath, - stdout = devnull) - # turn it back on - if mousedev: - try: - os.rename ("/dev/disablemouse", mousedev) - except OSError: - pass - try: - xmouse.reopen() - except RuntimeError: - pass + # XXX currently Bad Things (X async reply) happen when doing + # Mouse Magic on Sparc (Mach64, specificly) + if os.environ.has_key ("DISPLAY") and not arch == "sparc": + import xmouse + try: + mousedev = xmouse.get()[0] + except RuntimeError: + pass + if mousedev: + try: + os.rename (mousedev, "/dev/disablemouse") + except OSError: + pass + try: + xmouse.reopen() + except RuntimeError: + pass + argv = [ "/usr/sbin/kudzu", "-q" ] + devnull = os.open("/dev/null", os.O_RDWR) + iutil.execWithRedirect(argv[0], argv, root = self.instPath, + stdout = devnull) + # turn it back on + if mousedev: + try: + os.rename ("/dev/disablemouse", mousedev) + except OSError: + pass + try: + xmouse.reopen() + except RuntimeError: + pass + + # needed for prior systems which were not xinetd based + if self.upgrade: + self.migrateXinetd() + + # XXX make me "not test mode" + if self.setupFilesystems: + if arch == "sparc": + self.silo.install (self.fstab, self.instPath, self.hdList, + self.upgrade) + elif arch == "i386": + self.lilo.install (self.fstab, self.instPath, self.hdList, + self.upgrade) + elif arch == "ia64": + self.eli.install (self.fstab, self.instPath, self.hdList, + self.upgrade) + elif arch == "alpha": + self.milo.write () + else: + raise RuntimeError, "What kind of machine is this, anyway?!" - # needed for prior systems which were not xinetd based - if self.upgrade: - self.migrateXinetd() - - # XXX make me "not test mode" - if self.setupFilesystems: - if arch == "sparc": - self.silo.install (self.fstab, self.instPath, self.hdList, - self.upgrade) - elif arch == "i386": - self.lilo.install (self.fstab, self.instPath, self.hdList, - self.upgrade) - elif arch == "ia64": - self.eli.install (self.fstab, self.instPath, self.hdList, - self.upgrade) - elif arch == "alpha": - self.milo.write () - else: - raise RuntimeError, "What kind of machine is this, anyway?!" + # go ahead and depmod modules as modprobe in rc.sysinit + # will complain loaduly if we don't do it now. + self.depmodModules() - # go ahead and depmod modules as modprobe in rc.sysinit - # will complain loaduly if we don't do it now. - self.depmodModules() + self.instClass.postAction(self.instPath, self.serial) - self.instClass.postAction(self.instPath, self.serial) + if self.setupFilesystems: + f = open("/tmp/cleanup", "w") + self.method.writeCleanupPath(f) + self.fstab.writeCleanupPath(f) + f.close() - if self.setupFilesystems: - f = open("/tmp/cleanup", "w") - self.method.writeCleanupPath(f) - self.fstab.writeCleanupPath(f) - f.close() + del syslog + + finally: + w.pop () - del syslog - w.pop () |