From ae4cc707bbcbb1f458fdb51f0f430b8e9e5432c0 Mon Sep 17 00:00:00 2001 From: Guillaume Chazarain Date: Wed, 17 Jun 2009 22:29:19 +0200 Subject: [PATCH] Keep less processes around. --- gsh.1 | 2 +- gsh/main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gsh.1 b/gsh.1 index 93889d2..5a34c40 100644 --- a/gsh.1 +++ b/gsh.1 @@ -30,7 +30,7 @@ Read hostnames from given file, one per line. Hostnames are given on the command Command to execute on the remote shells. This starts \fIgsh\fR in non\-interactive mode. It will start the remote shells, send the command, print the output and exit when the command is completed on all remote shells. This is the same as piping a command on the standard input. Exit codes from the remote shells will be aggregated (taking the max) to form \fIgsh\fR's exit code. .TP \fB\-\-ssh=SSH\fR -Ssh command to use [ssh -oLogLevel=Quiet -t %(host)s bash --noprofile]. By default, \fIgsh\fR spawns lightweight remote shells using the ssh command, but another shell command can be specified here. For example, with \-\-ssh='usleep $((RANDOM*50)); exec ssh' a delay will be introduced to avoid all hosts accessing a NFS server at the same time. If the hostname should not be added at the end of the command, the macro %(host)s can be inserted where the hostname should be placed. Also, make sure the command you use launchs a pty, this may need the \-t option for ssh. +Ssh command to use [exec ssh -oLogLevel=Quiet -t %(host)s exec bash --noprofile]. By default, \fIgsh\fR spawns lightweight remote shells using the ssh command, but another shell command can be specified here. For example, with \-\-ssh='usleep $((RANDOM*50)); exec ssh' a delay will be introduced to avoid all hosts accessing a NFS server at the same time. If the hostname should not be added at the end of the command, the macro %(host)s can be inserted where the hostname should be placed. Also, make sure the command you use launchs a pty, this may need the \-t option for ssh. .TP \fB\-\-password\-file=FILE\fR read a password from the specified file. - is the tty. This can be used when public key authentication is not available, either write the password in a file, or set FILE to - so that \fIgsh\fR will prompt for a password. diff --git a/gsh/main.py b/gsh/main.py index 213300c..b0b3d05 100644 --- a/gsh/main.py +++ b/gsh/main.py @@ -61,7 +61,7 @@ def parse_cmdline(): parser.add_option('--command', type='str', dest='command', default=None, help='command to execute on the remote shells', metavar='CMD') - def_ssh = 'ssh -oLogLevel=Quiet -t %(host)s bash --noprofile' + def_ssh = 'exec ssh -oLogLevel=Quiet -t %(host)s exec bash --noprofile' parser.add_option('--ssh', type='str', dest='ssh', default=def_ssh, metavar='SSH', help='ssh command to use [%s]' % def_ssh) parser.add_option('--password-file', type='str', dest='password_file', -- 2.11.4.GIT