[rancid] Set per-host timeout in .cloginrc?
Michael W. Lucas
mwlucas at blackhelicopters.org
Mon Apr 30 15:06:24 UTC 2012
Patch works. Timeout is successfully set, changes checked in.
Thank you!
==ml
On Thu, Apr 26, 2012 at 03:04:26PM -0700, heasley wrote:
> Thu, Apr 26, 2012 at 05:11:06PM -0400, Michael W. Lucas:
> > Hi,
> >
> > I have a Mikrotik that runs export very slowly. It has several
> > full-route BGP peers in IPv4 and IPv6, filtering rules, and so on, so
> > this isn't terribly surprising.
> >
> > The default rancid timeout is 90 seconds.
> >
> > Is it possible to change the timeout in .cloginrc for just this
> > particular host, or do I need to edit mtlogin?
>
> cloginrc timeout knob is supposed to provide this, but its missing in
> mtlogin. this patch should do it.
>
> Index: bin/mtlogin.in
> ===================================================================
> --- bin/mtlogin.in (revision 2457)
> +++ bin/mtlogin.in (working copy)
> @@ -71,7 +71,7 @@
> # tracks if we receive them on the command line.
> set do_passwd 1
> # Sometimes routers take awhile to answer (the default is 10 sec)
> -set timeout 45
> +set timeoutdflt 45
>
> # Find the user in the ENV, or use the unix userid.
> if {[ info exists env(CISCO_USER) ]} {
> @@ -177,7 +177,7 @@
> -T* {
> if {! [ regexp .\[tT\](.+) $arg ignore timeout]} {
> incr i
> - set timeout [ lindex $argv $i ]
> + set timeoutdflt [ lindex $argv $i ]
> }
> # Command file
> } -x* -
> @@ -466,6 +466,12 @@
> set autoenable 1
> set enable 0
>
> + # device timeout
> + set timeout [find timeout $router]
> + if { [llength $timeout] == 0 } {
> + set timeout $timeoutdflt
> + }
> +
> # Figure out passwords
> if { $do_passwd } {
> set pswd [find password $router]
--
Michael W. Lucas
http://www.MichaelWLucas.com/, http://blather.MichaelWLucas.com/
Latest book: SSH Mastery http://www.michaelwlucas.com/nonfiction/ssh-mastery
mwlucas at BlackHelicopters.org, Twitter @mwlauthor
More information about the Rancid-discuss
mailing list