Exemplo n.º 1
0
 def debugClicked (self, *args):
     try:
         # switch to VC1 so we can debug
         isys.vtActivate (1)
     except SystemError:
         pass
     import pdb
     try:
         pdb.set_trace()
     except Exception:
         sys.exit(-1)
     try:
         # switch back
         isys.vtActivate (6)
     except SystemError:
         pass
Exemplo n.º 2
0
 def debugClicked (self, *args):
     try:
         # switch to VC1 so we can debug
         isys.vtActivate (1)
     except SystemError:
         pass
     import pdb
     try:
         pdb.set_trace()
     except:
         sys.exit(-1)
     try:
         # switch back
         isys.vtActivate (6)
     except SystemError:
         pass
Exemplo n.º 3
0
    def initInterface(self):
        if self._intf:
            raise RuntimeError, "Second attempt to initialize the InstallInterface"

        # setup links required by graphical mode if installing and verify display mode
        if self.displayMode == 'g':
            stdoutLog.info (_("Starting graphical installation."))

            try:
                from gui import InstallInterface
            except Exception as e:
                from flags import flags
                stdoutLog.error("Exception starting GUI installer: %s" %(e,))
                # if we're not going to really go into GUI mode, we need to get
                # back to vc1 where the text install is going to pop up.
                if not flags.livecdInstall:
                    isys.vtActivate (1)
                stdoutLog.warning("GUI installer startup failed, falling back to text mode.")
                self.displayMode = 't'
                if 'DISPLAY' in os.environ.keys():
                    del os.environ['DISPLAY']
                time.sleep(2)

        if self.displayMode == 't':
            from text import InstallInterface
            if not os.environ.has_key("LANG"):
                os.environ["LANG"] = "en_US.UTF-8"

        if self.displayMode == 'r':
            import rescue
            InstallInterface = rescue.RescueInterface

        if self.displayMode == 'c':
            from cmdline import InstallInterface

        if self.displayMode == 's':
            from script import InstallInterface

        self._intf = InstallInterface()
        return self._intf
Exemplo n.º 4
0
    def initInterface(self):
        if self._intf:
            raise RuntimeError, "Second attempt to initialize the InstallInterface"

        # setup links required by graphical mode if installing and verify display mode
        if self.displayMode == 'g':
            stdoutLog.info (_("Starting graphical installation."))

            try:
                from gui import InstallInterface
            except Exception, e:
                from flags import flags
                stdoutLog.error("Exception starting GUI installer: %s" %(e,))
                # if we're not going to really go into GUI mode, we need to get
                # back to vc1 where the text install is going to pop up.
                if not flags.livecdInstall:
                    isys.vtActivate (1)
                stdoutLog.warning("GUI installer startup failed, falling back to text mode.")
                self.displayMode = 't'
                if 'DISPLAY' in os.environ.keys():
                    del os.environ['DISPLAY']
                time.sleep(2)
Exemplo n.º 5
0
            except:
                log.error("Failed to copy %s to /mnt/sysimage/root" % self.exnFile)
                pass

        # run kickstart traceback scripts (if necessary)
        try:
            if anaconda.ksdata:
                kickstart.runTracebackScripts(anaconda)
        except:
            pass

    def runDebug(self, (ty, value, tb)):
        # vtActivate does not work on certain ppc64 machines, so just skip
        # that and continue with the rest of the debugger setup.
        try:
            isys.vtActivate(1)
        except SystemError:
            pass

        self.intf.__del__ ()

        pidfl = "/tmp/vncshell.pid"
        if os.path.exists(pidfl) and os.path.isfile(pidfl):
            pf = open(pidfl, "r")
            for pid in pf.readlines():
                if not int(pid) == os.getpid():
                    os.kill(int(pid), signal.SIGKILL)
            pf.close()

        os.open("/dev/console", os.O_RDWR)   # reclaim stdin
        os.dup2(0, 1)                        # reclaim stdout
Exemplo n.º 6
0
                log.error("Failed to copy %s to /mnt/sysimage/root" %
                          self.exnFile)
                pass

        # run kickstart traceback scripts (if necessary)
        try:
            if anaconda.ksdata:
                kickstart.runTracebackScripts(anaconda)
        except:
            pass

    def runDebug(self, (ty, value, tb)):
        # vtActivate does not work on certain ppc64 machines, so just skip
        # that and continue with the rest of the debugger setup.
        try:
            isys.vtActivate(1)
        except SystemError:
            pass

        self.intf.__del__()

        pidfl = "/tmp/vncshell.pid"
        if os.path.exists(pidfl) and os.path.isfile(pidfl):
            pf = open(pidfl, "r")
            for pid in pf.readlines():
                if not int(pid) == os.getpid():
                    os.kill(int(pid), signal.SIGKILL)
            pf.close()

        os.open("/dev/console", os.O_RDWR)  # reclaim stdin
        os.dup2(0, 1)  # reclaim stdout