}
if { [info exists exec_sock] && [info exists monitor_sock] } {
- for { set i 1 } { $i <= 4 } { incr i } {
- if {[lindex [fconfigure $exec_sock -sockname] 0] != "0.0.0.0" &&
- [lindex [fconfigure $monitor_sock -sockname] 0] != "0.0.0.0" } {
- set fail false
- break
- } else {
- after 250 ;# Max 2 sec for socket creation
- }
+ for { set i 1 } { $i <= 4 } { incr i } {
+ if {([lindex [fconfigure $exec_sock -sockname] 0] != "0.0.0.0") &&
+ ([lindex [fconfigure $monitor_sock -sockname] 0] != "0.0.0.0")
+ && ([catch {fconfigure $exec_sock -peername} a] == 0)
+ && ([catch {fconfigure $monitor_sock -peername} a] == 0) } {
+ set fail false
+ break
+ } else {
+ after 250 ;# Max 2 sec for socket creation
}
+ }
}
if { $fail } {
0 { ;# retry
}
1 { configRemoteHosts
+ ;# Never comes back!?
set at_least_one_up false
set n [llength $exec_hosts]
for { set i 0 } { $i < $n } { incr i } {
}
if { $remote_exec && ! $at_least_one_up } {
set editor_only true
- .menubat.experiment entryconfigure \
+ .menubar.experiment entryconfigure \
"Execute" -state disabled
}
}
- 2 { set editor_only true; set fail false; return }
+ 2 { set editor_only true
+ .menubar.experiment entryconfigure "Execute" -state disabled
+ set fail false
+ return
+ }
default { }
}
}
close $fileId
} else {
nexec nc -l -p 1235 > /tmp/$node_id/boot.conf &
- set s [socket $exec_host 1235]
+ ;# set s [socket $exec_host 1235]
+ catch {set s [socket -async $exec_host 1235]}
+ set fail true
+ for { set i 1 } { $i <= 4 } { incr i } {
+ if {[catch {fconfigure $s -peername} a] == 0 } {
+ set fail false
+ break
+ } else {
+ after 250 ;# Max 2 sec for socket creation
+ }
+ }
+ if { $fail } {
+ tk_messageBox -title "Boot file creation" \
+ -message "Cannot open socket: $exec_host:1235 for boot file creation. \nPlease report this problem." -type ok
+ exit 5
+ }
fconfigure $s -buffering line -translation lf
foreach line $bootcfg {
puts $s $line
flush $s
close $s
}
- catch "nexec vimage $node_id $bootcmd /tmp/$node_id/boot.conf &"
+ ;# removed backgroud invocation
+ catch "nexec vimage $node_id $bootcmd /tmp/$node_id/boot.conf"
}
}