1 (* Dnsmasq module for Augeas
2 Author: Free Ekanayaka <free@64studio.com>
4 Reference: man dnsmasq (8)
6 "Format is one option per line, legal options are the same
7 as the long options legal on the command line. See
8 "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details."
16 (************************************************************************
18 *************************************************************************)
21 let spc = Util.del_ws_spc
22 let comment = Util.comment
23 let empty = Util.empty
25 let sep_eq = del /=/ "="
26 let sto_to_eol = store /([^ \t\n].*[^ \t\n]|[^ \t\n])/
28 (************************************************************************
30 *************************************************************************)
32 let entry_re = /[A-Za-z0-9._-]+/
33 let entry = [ key entry_re . (sep_eq . sto_to_eol)? . eol ]
35 (************************************************************************
37 *************************************************************************)
39 let lns = (comment|empty|entry) *
41 let filter = incl "/etc/dnsmasq.conf"
42 . incl "/etc/dnsmasq.d/*"
46 let xfm = transform lns filter