rancid hangs due to expect, ssh, or cisco?
Johan Grip
johan.grip at emea.sykes.com
Fri Feb 7 13:13:20 UTC 2003
On Tue, Dec 31, 2002 23:08 Andrew Partan wrote:
>On Tue, Dec 31, 2002 at 02:49:48PM -0600, Zhang, Anchi wrote:
>> My temporary workaround to this problem is
>>
>> log2# diff clogin clogin.orig
>> 457c457
>> < send "term length 100\r"
>> ---
>> > send "term length 0\r"
>
>Well that is whacko. Is 'term length 0' not working on your router?
> --asp
I have the same problem here. Commands doing a lot of output hangs.
If I do clogin -c "wr ter" <somerouter> on a device with a large config
clogin hangs. Likewise with "sh cam dyn" on some catalysts as well.
I've basically used the same workaround, but also had to add a prompt
because one of my Cats changed the more prompt.
--SNIP--
--- clogin.in Tue Jul 30 07:14:10 2002
+++ /home/rancid/bin/clogin Fri Feb 7 13:00:40 2003
@@ -452,9 +454,9 @@
# skip if its an extreme.
if { [ string compare "extreme" "$platform" ] } {
if [ regexp -- ".*> .*enable" "$prompt" ] {
- send "set length 0\r"
+ send "set length 100\r"
} else {
- send "term length 0\r"
+ send "term length 100\r"
}
regsub -all "\[)(]" $prompt {\\&} reprompt
# match cisco config mode prompts too, but not for catalyst ie:
(enable)
@@ -496,6 +498,9 @@
-re "^ --More--\[^\n\r]*" {
send " "
exp_continue }
+ -re "^--More--\[^\n\r]*" {
+ send " "
+ exp_continue }
-re "^<-+ More -+>\[^\n\r]*" {
send_user --
"$expect_out(buffer)"
send " "
@@ -526,6 +531,9 @@
-re "^ --More--\[^\n\r]*" {
send " "
exp_continue }
+ -re "^--More--\[^\n\r]*" {
+ send " "
+ exp_continue }
-re "^<-+ More -+>\[^\n\r]*" {
send_user --
"$expect_out(buffer)"
send " "
--SNIP--
Could probably be solved in a nicer way by adjusting the regexp above it,
but I had
to fix it somewhat in a rush, and since forgotten about it.
Regards,
Johan
More information about the Rancid-discuss
mailing list