[rancid] Different outputs with fnrancid and rancid-run

Devon True devon at noved.org
Tue Jun 15 15:24:19 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.

fnrancid:

sub GetSystem {
    print STDERR "    In GetSystem: $_" if ($debug);
    while (<INPUT>) {
        tr/\015//d;
        next if /^\s*$/;
        last if(/$prompt/);
        if (/(^\s*System time:)(.*)/ && $filter_pwds >= 1) {
            ProcessHistory("ENC","","","$1=<removed>\n");
            next;
        }
        if (/(^\s*FortiClient application signature package:)(.*)/ &&
$filter_pwds >= 1) {
            ProcessHistory("ENC","","","$1=<removed>\n");
            next;
        }
        ProcessHistory("","","","$_");
    }
    #print STDOUT "Vendor: $vendor";
    ProcessHistory("SYSTEM","","","\n");
    return(0);
}

Manual run of fnrancid creates a .new file with the output I would expect:

!RANCID-CONTENT-TYPE: fortigate
[snip]
Branch point: 272
Release Version Information: MR2
System time:=<removed>

#config-version=FG200A-4.00-FW-build272-100331:opmode=0:vdom=0
#conf_file_ver=<removed>

However, if I run "rancid-run" and modify control.rancid to not delete
the temp files created, I see the information that should have been removed:

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


I tried searching through rancid-run, control-rancid, rancid-fe, and
par. I can also run "par -q -n 2 -c 'rancid-fe {}' $DIR/routers.single"
manually and get the output I expect.

Any suggestions or hints about where to look?

- --
Devon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwXmyMACgkQWP2WrBTHBS+dqACfQ1Pu6U1ZdbYnkZFScnzJ3U8g
IVoAoKib0jnDhEDXboKaYOrAZAYGEWl1
=wB/f
-----END PGP SIGNATURE-----


More information about the Rancid-discuss mailing list