1 (* Logwatch module for Augeas
2 Author: Francois Lebel <francois@flebel.com>
3 Based on the dnsmasq lens written by Free Ekanayaka.
5 Reference: man logwatch (8)
7 "Format is one option per line, legal options are the same
8 as the long options legal on the command line. See
9 "logwatch.pl --help" or "man 8 logwatch" for details."
17 (************************************************************************
19 *************************************************************************)
22 let spc = Util.del_ws_spc
23 let comment = Util.comment
24 let empty = Util.empty
26 let sep_eq = del / = / " = "
27 let sto_to_eol = store /([^ \t\n].*[^ \t\n]|[^ \t\n])/
29 (************************************************************************
31 *************************************************************************)
33 let entry_re = /[A-Za-z0-9._-]+/
34 let entry = [ key entry_re . sep_eq . sto_to_eol . eol ]
36 (************************************************************************
38 *************************************************************************)
40 let lns = (comment|empty|entry) *
42 let filter = incl "/etc/logwatch/conf/logwatch.conf"
46 let xfm = transform lns filter