Mailing List Archive

your mail
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.
your mail [ In reply to ]
Fri, Apr 02, 2004 at 10:55:07AM +0200, Axel Otto:
> Index: configs/de-gustavsburg01-loop.rtrs.lear.com
> ===================================================================
> retrieving revision 1.139
> diff -u -4 -r1.139 de-gustavsburg01-loop.rtrs.lear.com
> @@ -84,8 +84,12 @@
> !Slot CPU: part 73-3409-07, serial 16918033
> !
> !
> config-register 0x2102
> +
> + !
> + config-register 0x2102
> + !
> version 12.2
> service timestamps debug datetime msec localtime
> service timestamps log datetime localtime
> service password-encryption
> Index: configs/de-gustavsburg02-loop.rtrs.lear.com
> ===================================================================

oops, you'll also have to remove this:

# skip consecutive comment lines to avoid oscillating extra comment
# line on some access servers. grrr.
if (/^!/) {
next if ($comment);
ProcessHistory("","","",$_);
$comment++;
next;
}
$comment = 0;

or change that to

if (/^!\s*$/) {