From: numa Date: Fri, 4 Sep 2009 13:17:01 +0000 (+0200) Subject: koristi nove OS detected stvari za Linux support X-Git-Url: https://git.entuzijast.net/?a=commitdiff_plain;h=e26d625da140377b7822d954b27fb38104d7ecb7;p=imunes.git koristi nove OS detected stvari za Linux support --- diff --git a/editor.tcl b/editor.tcl index 8525f91..f69d112 100755 --- a/editor.tcl +++ b/editor.tcl @@ -1275,23 +1275,32 @@ proc button3node { c x y } { #**** proc spawnShell { node cmd } { upvar 0 ::cf::[set ::curcfg]::eid eid - global remote_exec exec_host gui_unix + global remote_exec exec_host gui_unix gui_freebsd gui_linux set node_id $eid\.$node if { $remote_exec } { nexec vimageShellServer.sh $node_id 1234 $cmd & - if { $gui_unix } { - exec xterm -sb -rightbar \ - -T "IMUNES: [getNodeName $node] (console)" \ - -e "nc $exec_host 1234" & - } else { - exec cmd /c nc $exec_host 1234 & - } + if { $gui_unix } { + exec xterm -sb -rightbar \ + -T "IMUNES: [getNodeName $node] (console)" \ + -e "nc $exec_host 1234" & + } else { + exec cmd /c nc $exec_host 1234 & + } } else { - nexec xterm -sb -rightbar \ - -T "IMUNES: [getNodeName $node] (console)" \ - -e "vimage $node_id $cmd" & + if { $gui_freebsd } { + set shellcommand "vimage $node_id $cmd" + } elseif { $gui_linux } { + if { $cmd == "/bin/sh" } { + set shellcommand "vzctl enter $node" + } else { + set shellcommand "vzctl exec $node $cmd" + } + } + nexec xterm -sb -rightbar \ + -T "IMUNES: [getNodeName $node] (console)" \ + -e "$shellcommand" & } }