Exemplo n.º 1
0
    def prompt(self, args=None):
        # run shell instead of printing prompt and close window on shell exit
        execConsole()
        self.close()

        # suppress the prompt
        return None
Exemplo n.º 2
0
def runShell(screen=None, msg=""):
    if screen:
        screen.suspend()

    print
    if msg:
        print(msg)

    if flags.imageInstall:
        print(
            _("Run %s to unmount the system when you are finished.") %
            ANACONDA_CLEANUP)
    else:
        print(
            _("When finished please exit from the shell and your "
              "system will reboot."))
    print

    proc = None

    if os.path.exists("/usr/bin/firstaidkit-qs"):
        proc = subprocess.Popen(["/usr/bin/firstaidkit-qs"])
        proc.wait()

    if proc is None or proc.returncode != 0:
        if os.path.exists("/bin/bash"):
            iutil.execConsole()
        else:
            print(_("Unable to find /bin/sh to execute!  Not starting shell"))
            time.sleep(5)

    if screen:
        screen.finish()
Exemplo n.º 3
0
def runShell(screen = None, msg=""):
    if screen:
        screen.suspend()

    print
    if msg:
        print (msg)

    if flags.imageInstall:
        print(_("Run %s to unmount the system when you are finished.")
              % ANACONDA_CLEANUP)
    else:
        print(_("When finished please exit from the shell and your "
                "system will reboot."))
    print

    proc = None

    if os.path.exists("/usr/bin/firstaidkit-qs"):
        proc = subprocess.Popen(["/usr/bin/firstaidkit-qs"])
        proc.wait()

    if proc is None or proc.returncode!=0:
        if os.path.exists("/bin/bash"):
            iutil.execConsole()
        else:
            print(_("Unable to find /bin/sh to execute!  Not starting shell"))
            time.sleep(5)

    if screen:
        screen.finish()
Exemplo n.º 4
0
 def run_shell(self):
     """Launch a shell."""
     if os.path.exists("/bin/bash"):
         iutil.execConsole()
     else:
         # TODO: FIXME -> move to UI (check via module api?)
         print(_("Unable to find /bin/bash to execute!  Not starting shell."))
         time.sleep(5)
Exemplo n.º 5
0
 def run_shell(self):
     """Launch a shell."""
     if os.path.exists("/bin/bash"):
         iutil.execConsole()
     else:
         # TODO: FIXME -> move to UI (check via module api?)
         print(
             _("Unable to find /bin/bash to execute!  Not starting shell."))
         time.sleep(5)
Exemplo n.º 6
0
def run_shell():
    """Launch a shell."""
    if flags.imageInstall:
        print(_("Run %s to unmount the system when you are finished.")
                % ANACONDA_CLEANUP)
    else:
        print(_("When finished, please exit from the shell and your "
                "system will reboot."))

    proc = None
    if proc is None or proc.returncode != 0:
        if os.path.exists("/bin/bash"):
            iutil.execConsole()
        else:
            print(_("Unable to find /bin/bash to execute!  Not starting shell."))
            time.sleep(5)

    if not flags.imageInstall:
        iutil.execWithRedirect("systemctl", ["--no-wall", "reboot"])
    else:
        return None
Exemplo n.º 7
0
def run_shell():
    """Launch a shell."""
    if flags.imageInstall:
        print(
            _("Run %s to unmount the system when you are finished.") %
            ANACONDA_CLEANUP)
    else:
        print(
            _("When finished, please exit from the shell and your "
              "system will reboot."))

    proc = None
    if proc is None or proc.returncode != 0:
        if os.path.exists("/bin/bash"):
            iutil.execConsole()
        else:
            print(
                _("Unable to find /bin/bash to execute!  Not starting shell."))
            time.sleep(5)

    if not flags.imageInstall:
        iutil.execWithRedirect("systemctl", ["--no-wall", "reboot"])
    else:
        return None