[rancid] Re: Pinning Moving Config Lines

Michael Stefaniuc mstefani at redhat.com
Wed Feb 4 13:17:58 UTC 2009


john heasley wrote:
> Wed, Jan 28, 2009 at 12:14:06PM +0100, Michael Stefaniuc:
>> john heasley wrote:
>>> Tue, Jan 27, 2009 at 11:18:14AM +0100, Michael Stefaniuc:
>>>> is there an easy way to assign a fixed position to config lines that
>>>> move around during two invocations of "write term"?
>>>>
>>>> In the Cisco SAN-OS devices the "callhome" config line moves between the
>>>> front and end of the "fcalias name" sections producing bogus change reports.
>>> how so?  please show an example of the moving.

>>>> The solutions I see on a quick glance (none satisfactory):
>>>> - The absolute easiest way would be to just drop the line but for this
>>>>   config line it doesn't seem like a wise idea.
>>>> - In the WriteTerm function create a separate ProcessHistory
>>>>   "fcalias name" section with sorting and add "callhome" to that section
>>>>   too. Drawback is that I would have to parse the "fcalias name"
>>>>   sections correctly too.
>>>>
>>>> Does anybody know a nicer way to pin the moving config line down?
>>> We'd normally just sort it.
>> Yeah, will be a pita in this case.
> 
> i really dislike ciscos for stuff like this.
> 
> try adding a match for it like
> /^callhome/ &&
> ProcessHistory("COMMENTS","keysort","Z0","$_") && next;
That would have been too easy if it would have worked. But it doesn't; I
tried it out but the "callhome" line still moves around.

I'll hack something up as it is annoying; depending on the amount of
"spare time" it will be a hack or a proper patch I can submit upstream.

bye
	michael
-- 
Michael Stefaniuc                           Tel.: +49-711-96437-199
Consulting Communications Engineer          Fax.: +49-711-96437-111
--------------------------------------------------------------------
Reg. Adresse: Red Hat GmbH, Otto-Hahn-Strasse 20, 85609 Dornach bei Muenchen
Handelsregister: Amtsgericht Muenchen HRB 153243
Geschäftsführer: Brendan Lane, Charlie Peters, Michael Cunningham,
                 Werner Knoblich


More information about the Rancid-discuss mailing list