[rancid] Re: jlogin timeout

Jean BENOIT jean.benoit at crc.u-strasbg.fr
Thu Jan 17 03:24:23 UTC 2008


On Tue, Jan 15, 2008 at 09:44:20PM +0000, john heasley wrote:
> Mon, Jan 14, 2008 at 07:09:56PM +0100, Jean BENOIT:
> > I am using expect-devel from the FreeBSD ports,
> > http://www.shrubbery.net/pipermail/rancid-discuss/2008-January/002672.html
[...]
> >  	    "\[Pp]assword:"	{
> > The "-re" flag should be provided for this line to work.
> 
> I don't think that should be necessary, since [] are valid in globs, which
> is the default pattern matching and is cheaper than regex.  I've tested it
You are right.

The expect-devel ports uses the latest version of exp_glob.c from
the expect cvs (rev. 5.34, dated 2007/07/17) which definitely has
an issue. This simple example :

    exp_internal 1 ; spawn sh -c "echo a && cat" ; expect {[a]} {puts ok}

times out with :

    expect: does "a\r\n" (spawn_id exp6) match glob pattern "[a]"? no
    expect: timed out

There is even debug code in exp_glob.c.
I am not sure this code has been really tested and is
supposed to work ...
I didn't have time to locate the bug precisely.
I submitted a bug in the Sourceforge Expect bug tracker.

> with tcl 8.4.14 and expect 8.4.7 and it works as expected and has worked
> with 8.3 in the past.
> So, there is another tcl regression.  You should open a freebsd ports
> ticket; I suspect this is a general problem with their build of the tcl83
> port.

It has nothing to do with a tcl regression. The problem is in expect.
Suggesting expect-devel as a solution to the pty problem was probably
not a wise move.

--
Jean Benoit
Centre Réseau Communication
Université Louis Pasteur, Strasbourg, France


More information about the Rancid-discuss mailing list