]> git.entuzijast.net Git - imunes.git/commitdiff
Added variables used for remote execution.
authormiljenko <miljenko>
Mon, 5 Dec 2005 09:34:22 +0000 (09:34 +0000)
committermiljenko <miljenko>
Mon, 5 Dec 2005 09:34:22 +0000 (09:34 +0000)
Bug found by:
Submitted by:
Requested by:
Reviewed by:
Approved by:
Obtained from:

imunes.tcl

index 605b05b62bda1d1aacf6ee9f8d23f85abbfe6dc0..92e698b57c6055c55861981791b15440a470da92 100755 (executable)
@@ -156,6 +156,78 @@ set canvas_list {}
 set prefs {}
 set eid e0
 
+#****v* imunes.tcl/exec_hosts
+# NAME
+#    exec_hosts -- list of remote hosts data lists
+# FUNCTION
+#    Currently only the first list entry is used (in proc nexec) as:
+#    IP address / port for commands execution / port for monitor commands.
+#    List can be overwritten in config file .imunesrc 
+#*****
+
+#         IP            port  monitor_port
+set exec_hosts [list \
+    [list 192.168.1.100 2547  2548] \
+    [list 10.0.0.1      1234  5678] \
+    [list 10.10.10.10   9876  5432] ]
+
+#****v* imunes.tcl/editor_only
+# NAME
+#    editor_only -- if set, Experiment -> Execute is disabled
+# FUNCTION
+#    IMUNES GUI can be used in editor-only mode.i
+#    This variable can be modified in .imunesrc and in Configure remote hosts.
+#*****
+
+set editor_only false
+
+#****v* imunes.tcl/exec_sockets_opened
+# NAME
+#    exec_sockets_opened
+# FUNCTION
+#    Used in nexec. Initial value: false. 
+#    Set to true when connection with remote hosts is established.
+#*****
+
+set exec_sockets_opened false
+
+#****v* imunes.tcl/gui_unix
+# NAME
+#    gui_unix
+# FUNCTION
+#    false: IMUNES GUI is on MS Windows, 
+#    true: GUI is on FreeBSD / Linux / ...
+#    Used in spawnShell to start xterm or command.com with NetCat
+#*****
+
+if { [catch {set s $env(COMSPEC)}] } {
+    set gui_unix true
+} else {
+    set gui_unix false
+}
+
+
+#****v* imunes.tcl/remote_exec
+# NAME
+#    remote_exec -- used in nexec 
+# FUNCTION
+#    0 - for local execution on FreeBSD,
+#    1 - IMUNES GUI is on remote (even if exec_host=localhost)
+#    If not set in config files, default is false on FreeBSD a true on MS Win.
+#    Can be 0 only if local OS is "Unix" and UID=0
+#*****
+
+set remote_exec true
+if { $gui_unix && [exec id -u] == 0 } {
+    set remote_exec false
+}
+
+
+#
+# Read config files, the first one found: .imunesrc, $HOME/.imunesrc
+#
+readConfigFile
+
 
 #
 # Initialization should be complete now, so let's start doing something...