aboutsummaryrefslogtreecommitdiff
path: root/rex
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-10-13 09:51:25 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2016-10-13 09:51:25 +0300
commitd777de47b14d6919400f3359f9edad97096b9e11 (patch)
tree03b17e0db875cd4f5d28a0aef1178442b354279e /rex
parent370c4bab61d8d944b4f1f304ed00d6ceb6047b72 (diff)
downloadrex-d777de47b14d6919400f3359f9edad97096b9e11.tar.gz
rex-d777de47b14d6919400f3359f9edad97096b9e11.tar.bz2
Bugfix
Prefix unrecognized messages obtained in the INIT state with "ssh HOSTNAME". Fix behavior of --ignore-hosts with legacy configuration.
Diffstat (limited to 'rex')
-rwxr-xr-xrex15
1 files changed, 8 insertions, 7 deletions
diff --git a/rex b/rex
index 1162c9a..1990587 100755
--- a/rex
+++ b/rex
@@ -2271,7 +2271,7 @@ proc runcmd {hosts command} {
switch -- [job get $batch $sid state] {
{INIT} {
set text [regsub -all {[\r\n]} $expect_out(0,string) {}]
- terror -nosave "[job id $batch $sid]: $text"
+ terror -nosave "ssh [job id $batch $sid]: $text"
}
{COMMAND} -
{SUDO} {
@@ -2686,12 +2686,13 @@ namespace eval ::config {
terror -nosave "warning: please change this to \"[apply $update_hint($var) [valueof $var]]\""
}
if {[info exists config($var)]} {
- if {$var == "hosts" &&
- ![info exists config(option,ignore-hosts)]} {
- set hosts [valueof hosts]
- lappend hosts {*}$config(hosts)
- set config(hosts) $hosts
- debug 3 "config(hosts) = $config(hosts)"
+ if {$var == "hosts"} {
+ if {![info exists config(option,ignore-hosts)]} {
+ set hosts [valueof hosts]
+ lappend hosts {*}$config(hosts)
+ set config(hosts) $hosts
+ debug 3 "config(hosts) = $config(hosts)"
+ }
}
} else {
set config($var) [valueof $var]

Return to:

Send suggestions and report system problems to the System administrator.