From e26d625da140377b7822d954b27fb38104d7ecb7 Mon Sep 17 00:00:00 2001 From: numa Date: Fri, 4 Sep 2009 15:17:01 +0200 Subject: [PATCH] koristi nove OS detected stvari za Linux support --- editor.tcl | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) 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" & } } -- 2.39.5