[rancid] Re: Download configs from one router through another

Ed Ravin eravin at panix.com
Thu Sep 11 20:17:45 UTC 2008

On Thu, Sep 11, 2008 at 02:52:38PM -0400, Graham Fleming wrote:
> Ed, thanks a lot for your patch. I got it working. Is there a way
> though, to use wildcards with the usercmd_chat?
> For instance, we log into a gateway router using a public IP address. We
> then specify a method to reach the internal routers using usercmd. All
> of the internal routers, let's say, are on the network. 
> Is there a way to add a universal method that would use the
> network as a wildcard (ie 10.0.0.*) and then could we put in a {*} or
> something in the usercmd_chat so that any prompt is matched?
> This would save us from adding dozens of separate .cloginrc commands for
> the internal routers.

I'm not sure I fully understand what you're trying to do - it would help
if you posted a sanitized .cloginrc of what you're doing now, and then
a wishful thinking .cloginrc of what you'd like to have.

The "usercmd" definitions are matched the same way everything else is
in the *login scripts, which would let you have a common usercmd for
groups of routers.  However, my patch doesn't add any fucntionality for
unique content in the usercmd variable or expansion of variables other
than what is already supported by clogin.  There may be a way to use
"$router" in the usercmd definition or some other extra coding in cloginrc
to do what you want; it might require an extra "eval" in clogin when
assigning the value of $usercmd.  Perhaps someone more familiar with
TCL and/or RANCID scripting could speak up with the details.

	-- Ed

More information about the Rancid-discuss mailing list