[rancid] Re: Pinning Moving Config Lines
heas at shrubbery.net
Wed Jan 28 19:43:26 UTC 2009
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.
> @@ -104,8 +104,9 @@
> snmp-server user ...
> no snmp-server enable traps vrrp
> snmp-server enable traps license
> + callhome
> fcalias name santest1_util vsan 10
> member pwwn 11:22:33:44:55:66:77:88
> fcalias name n0a-f0a vsan 10
> @@ -345,9 +346,8 @@
> fcalias name n1b-f0c vsan 30
> member pwwn 22:33:44:55:66:77:88:99
> - callhome
> zone name santest1_util_10 vsan 10
> member fcalias santest1_util
> member fcalias n0a-f0a
> member fcalias n0b-f0a
> The next rancid run the above diff would be reversed.
> >> 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
ProcessHistory("COMMENTS","keysort","Z0","$_") && next;
More information about the Rancid-discuss