[rancid] Re: Cisco 1900 configuration retrieval issue
Regnar Bang Lyngsø
regnar.lyngso at aak.com
Fri Jan 12 14:05:08 UTC 2007
Hi,
> After reviewing the archives, I found and read a thread from 3/24/06
> which details the issue I appear to be experiencing. I could not
> find a follow-up detailing a fix or workaround.
The fix I have used (don't know the version of Rancid we are running - so
no diff):
Around Line 538 in clogin:
for {set i 0} {$i < $num_commands} { incr i} {
send "[subst -nocommands [lindex $commands $i]]\r"
expect {
-re "\b+" { exp_continue }
Around line 553 in clogin:
-re "^ *--More--\[^\n\r]*" {
send " "
exp_continue }
Move the match for More up so that it is the first thing Expect tries to
match - i.e., patched version from line 536:
send "[subst -nocommands [lindex $commands $i]]\r"
expect {
-re "^ *--More--\[^\n\r]*" {
send " "
exp_continue }
-re "\b+" { exp_continue }
Works for us with Cat1900 (and doesn't break on our PIXs, 2924Ms, 2950s,
3548s, 3600s, 2948G-L3, and 3550 - be warned - it might break on other
Cisco boxes).
Regards,
--
Regnar Bang Lyngsø, Network Administrator
AarhusKarlshamn Denmark A/S
M.P. Bruuns Gade 27, DK-8000 Århus C, Denmark
Email: mailto:regnar.lyngso at aak.com
Phone: +45 87 30 61 65 Mobile: +45 40 45 08 89
More information about the Rancid-discuss
mailing list