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 Original line Diff line number Diff line
@@ -64,7 +64,7 @@ class FakeTtySocket(object):
        termios.tcsetattr(0, termios.TCSADRAIN, self._tc_attr)
        termios.tcsetattr(0, termios.TCSADRAIN, self._tc_attr)




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


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


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




class Command_console(TqlCommand):
class Command_console(TqlCommand):