[rancid] Discussion of what is almost certainly a terrible idea

Lee ler762 at gmail.com
Tue Aug 23 04:56:27 UTC 2011

On 8/22/11, Adam Korab <adam.korab at gmail.com> wrote:
> Hi gang,
> Has anybody ever attempted to coerce running rancid on a Windows
> host[0], using cygwin or the like?  If so, met with any success?

It works great using cygwin.  The problems I remember were that a
timeout tended to hang clogin.  My fix was sending an "exit" to the
ssh process somewhere around line 433:
	# This helps cleanup each expect clause.
	expect_after {
	    timeout {
		send_user "\nError: TIMEOUT reached\n"
		send "exit\r"       ;# -LR-
		catch {close}; catch {wait};
		if { $in_proc} {
		    return 1
		} else {

The other issue was that long device names caused [i forgot what
problem] in clogin.  My fix was bumping up the match length somewhere
around line 644:
	# match cisco config mode prompts too, such as router(config-if)#,
	# but catalyst does not change in this fashion.
	# -LR- regsub -all fails on cygwin + long device name.  {1,21} works
	regsub -all {^(.{1,21}).*([#>])$} $prompt
{\1([^#>\r\n]+)?[#>](\\([^)\\r\\n]+\\))?} reprompt
	expect {
	    -re $reprompt	{}
	    -re "\[\n\r]+"	{ exp_continue }


More information about the Rancid-discuss mailing list