[rancid] Re: Different outputs with fnrancid and rancid-run
john heasley
heas at shrubbery.net
Wed Jun 16 16:59:57 UTC 2010
Tue, Jun 15, 2010 at 11:24:19AM -0400, Devon True:
> All:
>
> I have modified the fnrancid script to omit some data the new Fortigate
> software gives during the "get system status". When I manually run
> fnrancid, the output is how I expect. However, if I run rancid-run, the
> data that should be removed is not.
>
> retrieving revision 1.33
> diff -U 4 -r1.33 <device>
> @@ -18,12 +18,12 @@
> Current HA mode: a-p, master
> Distribution: International
> Branch point: 272
> Release Version Information: MR2
> - System time: Tue Jun 15 10:15:38 2010
> + System time: Tue Jun 15 11:04:55 2010
>
> #config-version=FG200A-4.00-FW-build272-100331:opmode=0:vdom=0
> - #conf_file_ver=7431428455965478911
> + #conf_file_ver=17778636958364288780
This is probably the right patch:
Index: bin/fnrancid.in
===================================================================
--- bin/fnrancid.in (revision 2199)
+++ bin/fnrancid.in (working copy)
@@ -173,10 +173,13 @@
while (<INPUT>) {
tr/\015//d;
next if /^\s*$/;
- last if(/$prompt/);
+ last if (/$prompt/);
+
+ next if (/^System Time:/);
+ next if (/^conf_file_ver=:/);
+
ProcessHistory("","","","$_");
}
- print STDOUT "Vendor: $vendor";
ProcessHistory("SYSTEM","","","\n");
return(0);
}
More information about the Rancid-discuss
mailing list