Problem with Cisco 1900's and RANCID v2.3.2a

Roderick B. Greening Roderick.Greening at gt.ca
Tue Jun 7 23:51:28 UTC 2005


I downloaded the clogin.in file from ftp.shrubbery.net and it works for
1900's, but the one packaged in the tar ball doesn't.

I did a diff, and it appears as though some things were shuffled around in
the section dealing with the "--More--".

If this is an expect issue, can someone explain why the clogin.in file on
the ftp server appears to work and what was broken in expect that would need
to be patched.

I am running Mandrake Linux 10.1 and have installed the following expect RPM
and not applied any specific patch to expect: expect-8.4.5-6mdk

Running expect -v it returns: expect version 5.38.0

I also have the following RPM's for TCL:

tcl-8.4.5-6mdk
libtcl8.4-8.4.5-6mdk

Here's the diff -u between the rancid 2.3.2a version of clogin and the
standalone one that works from ftp.shrubbery.net/pub/rancid

[root at watson src]# diff -u rancid-2.3.2a/bin/clogin.in
ftp.shrubbery.net.clogin.in
--- rancid-2.3.2a/bin/clogin.in 2004-05-27 19:27:52.000000000 -0230
+++ ftp.shrubbery.net.clogin.in 2005-06-07 21:13:01.812283250 -0230
@@ -533,8 +533,6 @@
                                                }
                -re "^\[^\n\r]*$reprompt."      { send_user --
"$expect_out(buffer)"
                                                  exp_continue }
-               -re "\[\n\r]+"                  { send_user --
"$expect_out(buffer)"
-                                                 exp_continue }
                -re "\[^\r\n]*Press <SPACE> to cont\[^\r\n]*"   {
                                                  send " "
                                                  # bloody ^[[2K after " "
@@ -543,13 +541,15 @@
                                                        }
                                                  exp_continue
                                                }
-               -re "^ *--More--\[^\n\r]*"      {
+               -re "^ *--More--"       {
                                                  send " "
                                                  exp_continue }
                -re "^<-+ More -+>\[^\n\r]*"    {
                                                  send_user --
"$expect_out(buffer)"
                                                  send " "
                                                  exp_continue }
+               -re "\[\n\r]+"                  { send_user --
"$expect_out(buffer)"
+                                                 exp_continue }
            }
        }
     } else {
@@ -563,8 +563,6 @@
                                                }
                -re "^\[^\n\r]*$reprompt."      { send_user --
"$expect_out(buffer)"
                                                  exp_continue }
-               -re "\[\n\r]+"                  { send_user --
"$expect_out(buffer)"
-                                                 exp_continue }
                -re "\[^\r\n]*Press <SPACE> to cont\[^\r\n]*"   {
                                                  send " "
                                                  # bloody ^[[2K after " "
@@ -580,6 +578,8 @@
                                                  send_user --
"$expect_out(buffer)"
                                                  send " "
                                                  exp_continue }
+               -re "\[\n\r]+"                  { send_user --
"$expect_out(buffer)"
+                                                 exp_continue }
        }
     }
     log_user 1

Thanks.

PS: I can successfully telnet to the device. I can perform "sh version" for
example. It's just the pager ("--More--") that I can't get past by using the
packaged clogin script.


-----Original Message-----
From: john heasley [mailto:heas at shrubbery.net] 
Sent: Tuesday, June 07, 2005 8:57 PM
To: Roderick B. Greening
Cc: rancid-discuss at shrubbery.net
Subject: Re: Problem with Cisco 1900's and RANCID v2.3.2a

Tue, Jun 07, 2005 at 10:22:51AM -0700, Roderick B. Greening:
> Has anyone gotten Cisco 1900's to work with clogin?
> 
> Is there some special patch/change I need?
> 
> I have downloaded RANCID v2.3.2a and it works for everything else except
> this.
> 
> It hangs on the --More-- prompt.
> 
> Thanks.

my best guess is that you're running linux or solaris and did not compile
expect with the patch on the rancid web page.



More information about the Rancid-discuss mailing list