Re: [rancid] Unable to Conduct Cisco Wireless Controller Backup

heasley <[email protected]>
Newsgroups gmane.network.rancid
Message-ID <[email protected]>
Fri, Oct 12, 2018 at 03:36:20PM +0000, Piegorsch, Weylin William:
> ...with the exception of “if (!$clean_run || !$found_end)”.  For some reason I don’t understand, I keep getting “End of run not found”. I’ve attached .raw and .new files following an execution of “NOPIPE=YES rancid -d -t cisco-wlc5 <device>”.  I’m guessing it’s somehow related to how the session closes, but that’s a 100% guess. Any idea how I can resolve?

the device isnt echoing the \r\n at the logout.  i think this will fix it:

Index: lib/ciscowlc.pm.in
===================================================================
--- lib/ciscowlc.pm.in	(revision 3875)
+++ lib/ciscowlc.pm.in	(working copy)
@@ -42,10 +42,6 @@
 
 TOP: while(<$INPUT>) {
 	tr/\015//d;
-	if (/^.*logout(\s*Connection.*closed.*)?$/)  {
-	    $clean_run = 1;
-	    last;
-	}
 	if (/^Error:/) {
 	    print STDOUT ("$host wlogin error: $_");
 	    print STDERR ("$host wlogin error: $_") if ($debug);
@@ -78,6 +74,10 @@
 		last TOP;
 	    }
 	}
+	if (/^.*logout(\s*connection.*closed.*)?$/i) {
+	    $clean_run = 1;
+	    last;
+	}
     }
 }
 
@@ -91,6 +91,7 @@
     while (<$INPUT>) {
         tr/\015//d;
         tr/\020//d;
+	last if (/^$prompt/);
 
 	next if (/^\s*rogue ap classify/);
 	next if (/^\s*rogue (adhoc|client) (alert|unknown)/i);
@@ -118,7 +119,6 @@
 	    ProcessHistory("","","","!$1 <removed>\n"); next;
 	}
 
-	last if (/^$prompt/);
 	next if (/^(\s*|\s*$cmd\s*)$/);
 
 	$linecnt++;

_______________________________________________
Rancid-discuss mailing list
[email protected]
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.