Imported Upstream version 1.7.0
[platform/upstream/augeas.git] / lenses / clamav.aug
1 (*
2 Module: ClamAV
3   Parses ClamAV clamd and freshclam configuration files.
4
5 Author: Andrew Colin Kissa <andrew@topdog.za.net>
6   Baruwa Enterprise Edition http://www.baruwa.com
7
8 About: License
9   This file is licensed under the LGPL v2+.
10
11 About: Configuration files
12   This lens applies to /etc/clamd.conf, /etc/freshclam.conf and files in
13   /etc/clamd.d. See <filter>.
14 *)
15
16 module Clamav =
17 autoload xfm
18
19 (************************************************************************
20  * Group:                 USEFUL PRIMITIVES
21  ************************************************************************)
22
23 let word = /[A-Za-z][A-Za-z0-9]+/
24
25 let comment  = Util.comment
26
27 let some_value = Sep.space . store Rx.space_in
28
29 (************************************************************************
30  * Group: Entry
31  ************************************************************************)
32  
33 let example_entry = [ key "Example" . Util.eol ]
34
35 let clamd_entry = [ key word . some_value . Util.eol ]
36
37 (******************************************************************
38  * Group:                   LENS AND FILTER
39  ******************************************************************)
40
41 (************************************************************************
42  * View: Lns
43  ************************************************************************)
44
45 let lns = (Util.empty | example_entry | clamd_entry | comment )*
46
47 (* Variable: filter *)
48 let filter = (incl "/etc/clamd.conf")
49             . (incl "/etc/freshclam.conf")
50             . (incl "/etc/clamd.d/*.conf")
51
52 let xfm = transform lns filter