From e06f0e51be06cf7b149982f2588d52156c3642a9 Mon Sep 17 00:00:00 2001 From: Tore Anderson Date: Tue, 22 May 2007 17:54:06 +0200 Subject: Fixing Extreme support * Josh Rivel > I applied the diff to my Linux rancid box, but when running against our > one Extreme Summit 450-48T Switch running XOS 11.6.1.9, I get the "End > of run not found" error. Any thoughts? I've applied the patch to > Expect as well, and rancid is working fine for all of our Cisco gear (we > only have one Extreme switch) I get two of these, but ignored them since what ends in CVS looks good anyway. But try this updated patch and see if it fixes it for you? For me it does at least. It improves the match to test for a clean run, by checking for ssh's connection closed message on a line of its own. I also cleaned away a line I forgot about that printed that D ".." D debugging crap. Please keep the list Cc'ed, to help Google help others... Regards -- Tore Anderson --- bin/xrancid.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/xrancid.in b/bin/xrancid.in index 4a34fca..fdd7dd4 100644 --- a/bin/xrancid.in +++ b/bin/xrancid.in @@ -320,7 +320,6 @@ sub WriteTerm { } # XOS (at least version 11.3.3.7) is buggy and sometimees outputs only # the last 702 octets of the SSH key... make sure to strip it anyway - print STDERR "D \"$_\" D\n"; if (/^(configure ssh2 key pregenerated|[a-f\d]{2}(:[a-f\d]{2}){700,}\s*$)/ && $filter_pwds >= 1) { ProcessHistory("COMMENTS","keysort","H0","# configure ssh2 key \n"); # Only EW has a multiline key (terminated by a blank line) @@ -462,7 +461,7 @@ TOP: while() { # note: this match sucks rocks, but currently the extreme bits are # unreliable about echoing the 'exit\n' command. this match might really # be a bad idea, but instead rely upon WriteTerm's found_end? - if (/$prompt\s?(quit|exit|Connection( to \S+)? closed)/ && $found_end) { + if (/^$prompt\s?(quit|exit)|^Connection( to \S+)? closed/ && $found_end) { $clean_run=1; last; } -- cgit