your mail

john heasley heas at shrubbery.net
Fri Apr 2 08:06:50 UTC 2004


Fri, Apr 02, 2004 at 09:54:42AM +0200, Axel Otto:
> >*** 1130,1139 ****
> >            }
> >            tr/\015//d;
> >        }
> >-       # some versions have other crap mixed in with the bits in the
> >-       # block above
> >-       /^! (Last configuration|NVRAM config last)/ && next;
> >- 
> >        # skip consecutive comment lines to avoid oscillating extra comment
> >        # line on some access servers.  grrr.
> >        if (/^!/) {
> >--- 1130,1135 ----

> I've tried it out, by removing the four lines mentioned above out of my
> rancid script, but there is no change in diff's I have received after applying
> the patch. Here is what Jeff replied, unfortunately this is way above my
> "programming horizon". Does anyone have any further ideas on that ?
> 
> >> On Tue, Mar 30, 2004 at 10:01:36AM +0200, Otto, Axel wrote:
> >> I've deleted the four lines mentioned by your diff out of my rancid
> script,
> >> but there is no change ! Output is still the same as before and the NVRAM
> >> part is still filtered. Am I'm doing something wrong here ?
> 
> >Hrm.  It's probably the case that somewhere else in WriteTerm()
> >this line is simply being interpreted as a comment or otherwise
> >not processed for some reason.  You might have to dig into
> >ProcessHistory() as well.  Your best bet might be to throw a few
> >debug lines into WriteTerm() and run it by hand to see where the
> >text you're looking for is getting filtered.

I think that this may check/filter may be a little antiquated, though
was left for older IOSs.  can't say without checking deeply.

I suspect that if you also at least remove lines 1141 and 1143, you'll
have what you seek.

   1139         if (/^(##+$|(Building|Current) configuration)/i) {
   1140             while (<INPUT>) {
   1141                 next if (/^Current configuration\s*:/i);
   1142                 next if (/^:/);
   1143                 next if (/^([%!].*|\s*)$/);
   1144                 next if (/^ip add.*ipv4:/);     # band-aid for 3620 12.0
S           
   1145                 last;
   1146             }

Though, Andrew's last reply seems like a rather slick method; triggering
rancid runs.



More information about the Rancid-discuss mailing list