From: fredrik Date: Sat, 25 Aug 2007 00:26:45 +0000 (+0000) Subject: Tell ssh to allocate tty if rsc is runs on a tty. X-Git-Url: http://dolda2000.com/gitweb/?p=utils.git;a=commitdiff_plain;h=33dc94de07ef094300d2ea181998ccd719fcc1f2 Tell ssh to allocate tty if rsc is runs on a tty. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/utils@1098 959494ce-11ee-0310-bf91-de5d638817bd --- diff --git a/rsc b/rsc index 9e7e760..c915aab 100755 --- a/rsc +++ b/rsc @@ -39,6 +39,9 @@ if($ARGV[0] eq "-s") { } $ea = encode_base64($arg); $ea =~ s/\n//g; - exec "ssh", "$host", "rsc", "-s", $ea; + if(-t STDIN) { + push @sshopts, "-t"; + } + exec "ssh", @sshopts, "$host", "rsc", "-s", $ea; die "$!"; }