}
close $fileId
} else {
- nexec nc -l -p 1235 > /tmp/$node_id/boot.conf &
- ;# 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
+ nexec create_conf_file /tmp/$node_id/boot.conf
foreach line $bootcfg {
- puts $s $line
+ nexec $line
}
- flush $s
- close $s
+ nexec close_conf_file
}
- ;# removed backgroud invocation
- catch "nexec vimage $node_id $bootcmd /tmp/$node_id/boot.conf"
+ catch "nexec vimage $node_id $bootcmd /tmp/$node_id/boot.conf &"
}
}