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]
#
.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
}
#