/usr/share/augeas/lenses/dist/rancid.aug is in augeas-lenses 1.10.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | (*
Module: Rancid
Parses RANCiD router database
Author: Matt Dainty <matt@bodgit-n-scarper.com>
About: Reference
- man 5 router.db
Each line represents a record consisting of a number of ';'-separated fields
the first of which is the IP/Hostname of the device, followed by the type, its
state and optionally a comment.
*)
module Rancid =
autoload xfm
let sep = Util.del_str ";"
let field = /[^;#\n]+/
let comment = [ label "comment" . store /[^;#\n]*/ ]
let eol = Util.del_str "\n"
let record = [ label "device" . store field . sep . [ label "type" . store field ] . sep . [ label "state" . store field ] . ( sep . comment )? . eol ]
let lns = ( Util.empty | Util.comment_generic /#[ \t]*/ "# " | record )*
let filter = incl "/var/rancid/*/router.db"
. Util.stdexcl
let xfm = transform lns filter
(* Local Variables: *)
(* mode: caml *)
(* End: *)
|