]> git.entuzijast.net Git - imunes.git/commitdiff
koristi nove OS detected stvari za Linux support
authornuma <numa@numa-ubuntu-vm.(none)>
Fri, 4 Sep 2009 13:17:01 +0000 (15:17 +0200)
committernuma <numa@numa-ubuntu-vm.(none)>
Fri, 4 Sep 2009 13:17:01 +0000 (15:17 +0200)
editor.tcl

index 8525f910a7af7ba77f78b9f4ca6aa2494ef85bd6..f69d112e148ef69ef9a42a297e061a349d88002d 100755 (executable)
@@ -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" &
     }
 }