Commit 38f43471 authored by Sébastien Luttringer's avatar Sébastien Luttringer
Browse files

Rename rshell to shell

parent 4bff3f3e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ class FakeTtySocket(object):
        termios.tcsetattr(0, termios.TCSADRAIN, self._tc_attr)


class Command_rshell(TqlCommand):
class Command_shell(TqlCommand):
    '''Start a shell on the provided host'''

    def __init__(self, cli, argv0):
@@ -79,7 +79,7 @@ class Command_rshell(TqlCommand):
        if len(self.args) != 1:
            raise cmdBadArgument()
        # rpccall
        ans = self.rpccall("rshell", self.args[0], _status=False, _direct=True)
        ans = self.rpccall("shell", self.args[0], _status=False, _direct=True)
        # alias first object
        obj = ans['objects'][0]
        # check response is successful
@@ -102,7 +102,7 @@ class Command_rshell(TqlCommand):
            signal.signal(signal.SIGWINCH, _cb_sig_resize)
            # we need an async watcher to be able to handle sigwinch
            watcher = AsyncWatcher()
            watcher.register(self.rpc.rpc, "rshell_wait", obj["output"])
            watcher.register(self.rpc.rpc, "shell_wait", obj["output"])
            watcher.wait()
        finally:
            # restore original signal
@@ -113,7 +113,7 @@ class Command_rshell(TqlCommand):
            tun.close()

    def remote_functions(self):
        return set(("rshell",))
        return set(("shell",))


class Command_console(TqlCommand):