[rancid] modifying diff conditions

'heasley' heas at shrubbery.net
Fri Nov 22 21:29:30 UTC 2013


Fri, Nov 22, 2013 at 10:39:24AM +0000, Wayne Eisenberg:
> OK, I wasn't off too much but I didn't trust my results due to my non-mastery in the linux world. The only other way I can see making this work is to leave the cvs diff alone, and modify the rancid script itself. This is a PaloAlto device, so it's actually a script called panlong. Here's the section :
> 
> # This routine parses "show system info"
> sub ShowInfo {
>     my($slot);
> 
>     print STDERR "    In ShowInfo:: $_" if ($debug);
> 
>     while (<INPUT>) {
>         tr/\015//d;
>         next if /^\s*$/;
>         last if (/^$prompt/);
> 
>         next if (/^(time:|uptime:)/);
> 
>         ProcessHistory("INFO","","","#$_");
>     }
>     ProcessHistory("INFO","","","#\n");
>     return(0);
> }
> 
> If I add a line 'next if (/^(wildfire|av)/);' in the "while (<INPUT>)" section, that ought to skip retrieving those lines. If they're not retrieved, they can't be diff'ed, right?

correct.


More information about the Rancid-discuss mailing list