From: miljenko Date: Mon, 2 Jan 2006 16:12:40 +0000 (+0000) Subject: Remote boot.conf file creation modified. X-Git-Url: https://git.entuzijast.net/?a=commitdiff_plain;h=bc46cf2fb9fe57fe888e9a4475da80524ed21328;p=imunes.git Remote boot.conf file creation modified. Bug found by: Submitted by: Requested by: Reviewed by: Approved by: Obtained from: --- diff --git a/exec.tcl b/exec.tcl index 930d2ec..b254937 100755 --- a/exec.tcl +++ b/exec.tcl @@ -521,32 +521,13 @@ proc deployCfg {} { } 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 &" } }