Imported Upstream version 0.10.0
[platform/upstream/augeas.git] / lenses / webmin.aug
1 (* Webmin module for Augeas
2  Author: Free Ekanayaka <free@64studio.com>
3
4  Reference:
5
6 *)
7
8 module Webmin =
9
10    autoload xfm
11
12 (************************************************************************
13  *                           USEFUL PRIMITIVES
14  *************************************************************************)
15
16 let eol        = Util.eol
17 let comment    = Util.comment
18 let empty      = Util.empty
19
20 let sep_eq     = del /=/ "="
21
22 let sto_to_eol = store /([^ \t\n].*[^ \t\n]|[^ \t\n])/
23
24 let word       = /[A-Za-z0-9_.-]+/
25
26 (************************************************************************
27  *                               ENTRIES
28  *************************************************************************)
29
30 let entry     = [ key word
31                 . sep_eq
32                 . sto_to_eol?
33                 . eol ]
34
35 (************************************************************************
36  *                                LENS
37  *************************************************************************)
38
39 let lns        = (comment|empty|entry) *
40
41 let wm_incl (n:string)
42                = (incl ("/etc/webmin/" . n))
43 let filter
44                = wm_incl "miniserv.conf"
45                . wm_incl "ldap-useradmin/config"
46                . Util.stdexcl
47
48 let xfm        = transform lns filter