]> git.entuzijast.net Git - imunes.git/commitdiff
smanjio kolicinu OS-specificsa
authorJosip Rodin <joy@numa-ubuntu-vm.(none)>
Sun, 13 Sep 2009 12:43:56 +0000 (14:43 +0200)
committerJosip Rodin <joy@numa-ubuntu-vm.(none)>
Sun, 13 Sep 2009 12:43:56 +0000 (14:43 +0200)
editor.tcl

index 5a5aec8211cea7ef9c3d20ac0db4a5863dd5c4c9..a34622ae45aae2b9af1d52f710f1d0eb46fc733d 100755 (executable)
@@ -1053,8 +1053,6 @@ proc button3node { c x y } {
     upvar 0 ::cf::[set ::curcfg]::oper_mode oper_mode
     upvar 0 ::cf::[set ::curcfg]::eid eid
 
-    global gui_freebsd gui_linux
-
     set node [lindex [$c gettags {node && current}] 1]
     if { $node == "" } {
        set node [lindex [$c gettags {nodelabel && current}] 1]
@@ -1204,31 +1202,25 @@ proc button3node { c x y } {
     #
     .button3menu.shell delete 0 end
     if { $oper_mode == "exec" && [[typemodel $node].layer] == "NETWORK" } {
-       .button3menu add cascade -label "Shell window" \
-           -menu .button3menu.shell
-       set cmd [[typemodel $node].shellcmd $node]
-    
-    # OpenVZ radi na principu ulaska u VE, nema pokretanja shell-a
-       if { $cmd != "/bin/sh" && $cmd != "" && $gui_freebsd } {
-           .button3menu.shell add command -label "$cmd" \
-               -command "spawnShell $node $cmd"
-       }
-
-    # namjestanje labele da lijepo izgleda
-       if { $gui_linux } {
-           set label "Enter VE (bash)"
-           set shellCommand "enter"
-       } else {
-           set label "/bin/sh"
-           set shellCommand "/bin/sh"
-       }
-       
-       #kljucna rijec enter oznacava ulazak u OpenVZ VE
-       .button3menu.shell add command -label $label \
-           -command "spawnShell $node $shellCommand"
+               .button3menu add cascade -label "Shell window" \
+                   -menu .button3menu.shell
+               set cmd [[typemodel $node].shellcmd $node]
+               if { $cmd != "/bin/sh" && $cmd != "" } {
+                   .button3menu.shell add command -label "$cmd" \
+                               -command "spawnShell $node $cmd"
+               }
+           # OpenVZ: namjestanje labele da lijepo izgleda
+               global gui_linux
+               if { $gui_linux } {
+                   set label "Enter VE (shell)"
+               } else {
+                   set label "/bin/sh"
+               }
+       .button3menu.shell add command -label $label \
+           -command "spawnShell $node /bin/sh"
     } else {
-       .button3menu add cascade -label "Shell window" \
-           -menu .button3menu.shell -state disabled
+               .button3menu add cascade -label "Shell window" \
+                   -menu .button3menu.shell -state disabled
     }
 
     #