<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.emailquote, li.emailquote, div.emailquote
{mso-style-name:emailquote;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:1.0pt;
border:none;
padding:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal" style="margin-bottom:12.0pt">Thanks. I just tried, and got the same "end of run not found." Then I realized I wasn’t merely cutting/pasting from one location to another, but also the specific logout text test changed; once I updated to
what you showed, it worked perfectly. Also - the lines I had were at different indexes, and different offsets between old/new locations where the commands moved. For reference, diff below not to my .in file (I don’t have the original install makefiles),
but against the production library file.<br>
<br>
Lest I forget – Muchos mahalo for the help on this the past few months working through things.<br>
<br>
Weylin<br>
<br>
[rancid@nsgv-prod-59 ~]$ diff -u lib/rancid/ciscowlc.pm-original-3.4.1 lib/rancid/ciscowlc.pm<br>
--- lib/rancid/ciscowlc.pm-original-3.4.1 2016-08-01 22:57:39.636366474 -0400<br>
+++ lib/rancid/ciscowlc.pm 2018-10-15 02:12:48.334651972 -0400<br>
@@ -90,10 +90,6 @@<br>
<br>
TOP: while(<$INPUT>) {<br>
tr/\015//d;<br>
- if (/^.*logout$/) {<br>
- $clean_run = 1;<br>
- last;<br>
- }<br>
if (/^Error:/) {<br>
print STDOUT ("$host wlogin error: $_");<br>
print STDERR ("$host wlogin error: $_") if ($debug);<br>
@@ -126,6 +122,10 @@<br>
last TOP;<br>
}<br>
}<br>
+ if (/^.*logout(\s*connection.*closed.*)?$/i) {<br>
+ $clean_run = 1;<br>
+ last;<br>
+ }<br>
}<br>
}<br>
<br>
@@ -140,6 +140,7 @@<br>
tr/\015//d;<br>
tr/\020//d;<br>
<br>
+ last if (/^$prompt/);<br>
next if (/^\s*rogue ap classify/);<br>
next if (/^\s*rogue adhoc alert/);<br>
<br>
@@ -165,7 +166,6 @@<br>
ProcessHistory("","","","!$1 <removed>\n"); next;<br>
}<br>
<br>
- last if (/^$prompt/);<br>
next if (/^(\s*|\s*$cmd\s*)$/);<br>
<br>
$linecnt++;<br>
[rancid@nsgv-prod-59 ~]$<br>
<br>
<br>
-----Original Message-----<br>
From: heasley <heas@shrubbery.net><br>
Date: Friday, October 12, 2018 at 8:38 PM<br>
To: Weylin Piegorsch <weylin@bu.edu><br>
Cc: "rancid-discuss@shrubbery.net" <rancid-discuss@shrubbery.net><br>
Subject: Re: [rancid] Unable to Conduct Cisco Wireless Controller Backup<br>
<br>
Fri, Oct 12, 2018 at 03:36:20PM +0000, Piegorsch, Weylin William:<br>
> ...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?<br>
<br>
the device isnt echoing the \r\n at the logout. i think this will fix it:<br>
<br>
Index: lib/ciscowlc.pm.in<br>
===================================================================<br>
--- lib/ciscowlc.pm.in (revision 3875)<br>
+++ lib/ciscowlc.pm.in (working copy)<br>
@@ -42,10 +42,6 @@<br>
<br>
TOP: while(<$INPUT>) {<br>
tr/\015//d;<br>
- if (/^.*logout(\s*Connection.*closed.*)?$/) {<br>
- $clean_run = 1;<br>
- last;<br>
- }<br>
if (/^Error:/) {<br>
print STDOUT ("$host wlogin error: $_");<br>
print STDERR ("$host wlogin error: $_") if ($debug);<br>
@@ -78,6 +74,10 @@<br>
last TOP;<br>
}<br>
}<br>
+ if (/^.*logout(\s*connection.*closed.*)?$/i) {<br>
+ $clean_run = 1;<br>
+ last;<br>
+ }<br>
}<br>
}<br>
<br>
@@ -91,6 +91,7 @@<br>
while (<$INPUT>) {<br>
tr/\015//d;<br>
tr/\020//d;<br>
+ last if (/^$prompt/);<br>
<br>
next if (/^\s*rogue ap classify/);<br>
next if (/^\s*rogue (adhoc|client) (alert|unknown)/i);<br>
@@ -118,7 +119,6 @@<br>
ProcessHistory("","","","!$1 <removed>\n"); next;<br>
}<br>
<br>
- last if (/^$prompt/);<br>
next if (/^(\s*|\s*$cmd\s*)$/);<br>
<br>
$linecnt++;<br>
<br>
<br>
<o:p></o:p></p>
</div>
</body>
</html>