set node_id $eid\_$node
if { $remote_exec } {
- nexec vimageShellServer.sh $node_id 1234 &
+ nexec vimageShellServer.sh $node_id 1234 $cmd &
if { $gui_unix } {
exec xterm -sb -rightbar \
-T "IMUNES: [getNodeName $node] (console)" \
proc configRemoteHosts {} {
global exec_hosts
- global exec_host exec_port monitor_port remote_exec
- global old_remote_exec
- global editor_only
+ global remote_exec old_remote_exec editor_only
+ global active_host
+
set old_remote_exec $remote_exec
if { $remote_exec } {
label $wi.hosts.ports.label -text "Port" -anchor w
frame $wi.hosts.monitors -borderwidth 2
label $wi.hosts.monitors.label -text "Monitor port" -anchor w
+ frame $wi.hosts.active -borderwidth 2
+ label $wi.hosts.active.label -text "Active" -anchor w
set i 0
foreach host_elem $exec_hosts {
-validate focus -invcmd "focusAndFlash"
$wi.hosts.monitors.v$i insert 0 [lindex $host_elem 2]
+ eval checkbutton $wi.hosts.active.v$i \
+ -variable active_host($i) -onvalue true -offvalue false
+
incr i
}
- foreach j [list labels address ports monitors] {
+ foreach j [list labels address ports monitors active] {
eval pack $wi.hosts.$j.label -side top -padx 4 -pady 2 -fill x
set n [llength $exec_hosts]
for {set i 0} {$i < $n} {incr i} {
}
}
pack $wi.hosts.labels $wi.hosts.address $wi.hosts.ports \
- $wi.hosts.monitors -side left -fill x
+ $wi.hosts.monitors $wi.hosts.active -side left -fill x
pack $wi.select $wi.hosts -side top -fill x -padx 4
frame $wi.butt -borderwidth 4
}
;# Apply and Cancel explicitly destroy $wi
vwait forever
- ;# return
}
proc configRemoteHostsApply { wi } {
global exec_hosts
+ global active_host
+ global remote_exec editor_only
set n [llength $exec_hosts]
set exec_hosts []
+ set at_least_one_up false
for {set i 0} {$i < $n} {incr i} {
set ent [list [$wi.hosts.address.v$i get] \
[$wi.hosts.ports.v$i get] \
[$wi.hosts.monitors.v$i get]\
- ]
+ $active_host($i) ]
lappend exec_hosts $ent
+ if { $active_host($i) } { set at_least_one_up true }
+ }
+ if { $remote_exec && ! $at_least_one_up } {
+ set editor_only true
+ .menubar.experiment entryconfigure "Execute" -state disabled
}
destroy $wi
}