From eba4cd9fa4c4a05bc251f2dc2bbb40393eac7600 Mon Sep 17 00:00:00 2001 From: numa Date: Fri, 4 Sep 2009 15:50:22 +0200 Subject: [PATCH] Revert "vratili original FreeBSD host.tcl i exec.tcl, a dodali Linux verzije u linux/; dodali OS detection i pomaknuli platform detection iznad source'inga tako da to ide kondicionalno" This reverts commit 15d9560111cb52ecc8d528000e18e8a1053592bf. --- imunes.tcl | 78 +++++++++++++++++------------------------------------- 1 file changed, 25 insertions(+), 53 deletions(-) diff --git a/imunes.tcl b/imunes.tcl index 4fd9dd8..52cb6e3 100755 --- a/imunes.tcl +++ b/imunes.tcl @@ -102,33 +102,6 @@ if { $ROOTDIR == "." } { set BINDIR "bin" } -#****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 -# Used below in order to source the right OS-specific files -#***** - -if { $tcl_platform(platform) == "unix" } { - set gui_unix true - if { $tcl_platform(os) == "FreeBSD" } { - set gui_freebsd true - set gui_linux false - } elseif { $tcl_platform(os) == "Linux" } { - set gui_linux true - set gui_freebsd false - } else { - puts "a bit lost here... apparently I am $tcl_platform(os)" - exit 1 - } -} else { - set gui_unix false -} -#puts "we have gui_unix=$gui_unix gui_linux=$gui_linux"; - source "$ROOTDIR/$LIBDIR/canvas.tcl" source "$ROOTDIR/$LIBDIR/linkcfg.tcl" source "$ROOTDIR/$LIBDIR/nodecfg.tcl" @@ -136,34 +109,18 @@ source "$ROOTDIR/$LIBDIR/ipv4.tcl" source "$ROOTDIR/$LIBDIR/ipv6.tcl" source "$ROOTDIR/$LIBDIR/ipsec.tcl" source "$ROOTDIR/$LIBDIR/cfgparse.tcl" - -if { $gui_unix && $gui_linux } { - source "$ROOTDIR/$LIBDIR/linux/exec.tcl" -} else { - source "$ROOTDIR/$LIBDIR/exec.tcl" -} - +# TODO: odrediti je li FreeBSD ili Linux i ovisno o tome ucitati pravi exec.tcl +source "$ROOTDIR/$LIBDIR/exec.tcl" source "$ROOTDIR/$LIBDIR/eventsched.tcl" -if { $gui_unix && $gui_linux } { -# source "$ROOTDIR/$LIBDIR/quagga.tcl" -# source "$ROOTDIR/$LIBDIR/xorp.tcl" -# source "$ROOTDIR/$LIBDIR/static.tcl" -# source "$ROOTDIR/$LIBDIR/pc.tcl" - source "$ROOTDIR/$LIBDIR/linux/host.tcl" -# source "$ROOTDIR/$LIBDIR/hub.tcl" -# source "$ROOTDIR/$LIBDIR/lanswitch.tcl" -# source "$ROOTDIR/$LIBDIR/rj45.tcl" -} else { - source "$ROOTDIR/$LIBDIR/quagga.tcl" - source "$ROOTDIR/$LIBDIR/xorp.tcl" - source "$ROOTDIR/$LIBDIR/static.tcl" - source "$ROOTDIR/$LIBDIR/pc.tcl" - source "$ROOTDIR/$LIBDIR/host.tcl" - source "$ROOTDIR/$LIBDIR/hub.tcl" - source "$ROOTDIR/$LIBDIR/lanswitch.tcl" - source "$ROOTDIR/$LIBDIR/rj45.tcl" -} +source "$ROOTDIR/$LIBDIR/quagga.tcl" +source "$ROOTDIR/$LIBDIR/xorp.tcl" +source "$ROOTDIR/$LIBDIR/static.tcl" +source "$ROOTDIR/$LIBDIR/pc.tcl" +source "$ROOTDIR/$LIBDIR/host.tcl" +source "$ROOTDIR/$LIBDIR/hub.tcl" +source "$ROOTDIR/$LIBDIR/lanswitch.tcl" +source "$ROOTDIR/$LIBDIR/rj45.tcl" source "$ROOTDIR/$LIBDIR/editor.tcl" source "$ROOTDIR/$LIBDIR/copypaste.tcl" @@ -244,6 +201,21 @@ set editor_only false 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 { $tcl_platform(platform) == "unix" } { + set gui_unix true +} else { + set gui_unix false +} + #****v* imunes.tcl/remote_exec # NAME -- 2.39.5