|
# WARNING: It is possible for a remote machine to be in a crashed # state where an ssh connection will be established but # the client connection will hang forever doing a blocking # read - this is a known behaviour of ssh that is not # considered a bug. # |
|
set result [ list ] |
|
if { ! [ string match #* $node ] } { if { [ string match scp [ lindex $argv 0 ] ] } { set local [ lindex $argv 1 ] set target [ lindex $argv 2 ] catch { eval eval exec $scp } result } else { catch { eval exec $ssh $node $argv } result } puts stderr "$node : '$result'" |
|
if { [ string match #* $node ] } { set msg "skipping line: '$line'" } elseif { [ string match scp [ lindex $argv 0 ] ] } { set local [ lrange $argv 1 end-1 ] set target [ lindex $argv end ] catch { eval eval exec $scp } result set msg "scp $local -> $target" |
|
puts stderr "skipping line: '$line'" |
|
catch { eval exec $ssh $node $argv } result set msg "ssh $node $argv" |
|
if { [ string length $result ] } { set msg "$msg : '$result'" } puts stderr $msg |