pvinn...@gmail.com wrote:
> Hello,
> I am tasked with solving a problem with Expect script. I'm a newbie
> to the Tcl/TK, Expect world.
> We have this script for installing software remotely, that has been
> working for quite a while.
> Recently, there has been an upgrade in the environment to Linux 1.6,
> and the script stopped working.
There is no such thing as "Linux 1.6". There might be some distro
(i.e., Redhat) which might be at version 1.6, but a specific distro is
not "Linux".
> It looks like the following is failing:
> if {[OpenSession $HostID $UserName $Password $Prompt $HostID $CONNECTION_TYPE]!=1} {
> LogMessage e "Cannot determine uname information : Could not open session to $HostID"
> set timeout $oTimeout
> return -1
> }
> Can anyone please give some insight as to why it is failing? Is there
> an alternative to OpenSession providing same functionality?
"OpenSession" appears to likely be a command defined in the expect
script itself, because it is not a standard command provided by the
expect package. so you will have to look elsewhere within the expect
script to find the definition of "OpenSession" to see what operations
it performs.
However, the log error message the author included gives you some
clues. It seems to be expecting a certian output from the uname
command, and either uname is not installed (unlikely, but possible) or
the format output for the new uname has changed in some subtle way from
your old environment and it is causing the expect script to fail.