<br><br><div class="gmail_quote">On Fri, Jan 29, 2010 at 6:00 AM, Martin Barry <span dir="ltr"><<a href="mailto:marty@supine.com" target="_blank">marty@supine.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
$quoted_author = "Brian Lam" ;<br>
<div>><br>
> The expect / python script /usr/local/rancid/bin/clogin was looping because<br>
> my router doesn't like 'exit' and prefer 'quit'.<br>
<br>
</div>You can either modify the following to match the 'force10' platform (does<br>
the newer one accept quit?)<br>
<br></blockquote><div><br><br>the new f10 version accepts 'quit'<br><br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
# line 678<br>
if { [ string compare "extreme" "$platform" ] } {<br>
send -h "exit\r"<br>
} else {<br>
send -h "quit\r"<br>
}<br>
<br></blockquote><div><br><br><br>my version of rancid is 2.3.2<br><br>per your recommendation, here's the diff:<br><br>EQX root@itops1a:/usr/local/rancid/bin# diff clogin clogin.original <br>662,664c662<br>< if { [ string compare "force10" "$platform" ] } {<br>
< send -h "quit\r"<br>< } elseif { [ string compare "extreme" "$platform" ] } {<br>---<br>> if { [ string compare "extreme" "$platform" ] } {<br>EQX root@itops1a:/usr/local/rancid/bin# <br>
<br>it's a case of fixing one thing and another breaks...<br><br>it looks like it's not looping anymore but it's not updating any of the f10 switches (the previous working f10 are not updated either). rancid log shows the following for all force10 router:<br>
(maybe because the output is different now, rancid end regex doesn't work anymore?)<br><br>=====================================<br>Getting missed routers: round 1.<br>r103: End of run not found<br>end<br>r103-2: End of run not found<br>
end<br>r205-sw1: End of run not found<br>end <br>ec1: End of run not found<br>end<br>ec2: End of run not found<br>end<br>r304: End of run not found<br>end<br>r304-2: End of run not found<br>end<br>=====================================<br>
<br><br><br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
or you could add a stanza in the next section to catch the error thrown when<br>
sending 'exit' to old force10.<br>
<br></blockquote><div><br><br><br>maybe i will target the stanza instead and have better luck. the loop output is below. the first 'exit' works but the 2nd on throws an error '% Invalid input detected at '^' marker.' <br>
<br>could you help point me to the right place where i can write an expect regexp to capture this error and deal with it? many thanks. spend many hr pulling my hair / debugging! :p btw, is their a debug flag that i can set to get more debug outputs?<br>
<br><br><br>(looping output)<br><br> interface vlan 1<br> exit <br><br><br><br>exit <br>end <br><br>r204-sw1#exit<br><br>r204-sw1>exit<br> ^<br>% Invalid input detected at '^' marker.<br><br>r204-sw1>exit<br>
^<br>% Invalid input detected at '^' marker.<br><br>r204-sw1>exit<br> ^<br>% Invalid input detected at '^' marker.<br><br>r204-sw1>exit<br> ^<br><br>(looping...)<br><br><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
cheers<br>
Marty<br>
_______________________________________________<br>
Rancid-discuss mailing list<br>
<a href="mailto:Rancid-discuss@shrubbery.net" target="_blank">Rancid-discuss@shrubbery.net</a><br>
<a href="http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss" target="_blank">http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Brian Lam | IT/Operations | Rockyou, Inc. | Phone: 408-425-9801 | AIM: brianclam2<br>