source vars.exp
source procs.exp

# Uncomment to turn on the extra debug - lots of information so default is off
# startdebug

# Try to optimise 
optimiselaunch

# Normal launch procedure
initialise
#preexpbefore
if {$env(TTA_COMMAND) != ""} {
    if {$env(TTA_CONNECTIONSERVICE) != "shell" && $env(TTA_CONNECTIONSERVICE) != "exec" && $env(TTA_CONNECTIONSERVICE) != "rcmd"} {
	login
	startshells
    } else {
	# For the exec and shell services there is no interaction
	# therefore we ensure prompt detection always succeeds by
	# matching anything
	set prompts(prompt) ""
	expect *
    } 
    setupenv
    mansetupenv
    runauxcommands
    runmaincommand
} else {
    expect "\n"
    scriptcomplete
}



















