1 (* Spacevars module for Augeas
2 Author: Free Ekanayaka <free@64studio.com>
4 Reference: man interfaces
5 This is a generic lens for simple key/value configuration files where
6 keys and values are separated by a sequence of spaces or tabs.
13 (************************************************************************
15 *************************************************************************)
17 let comment = Util.comment
18 let empty = Util.empty
20 (************************************************************************
22 *************************************************************************)
25 let entry = Build.key_ws_value /[A-Za-z0-9._-]+(\[[0-9]+\])?/
27 (************************************************************************
29 *************************************************************************)
31 let lns = (comment|empty|entry)*
33 let simple_lns = lns (* An alias for compatibility reasons *)
35 (* configuration files that can be parsed without customizing the lens *)
36 let filter = incl "/etc/havp/havp.config"
37 . incl "/etc/ldap.conf"
38 . incl "/etc/ldap/ldap.conf"
39 . incl "/etc/libnss-ldap.conf"
40 . incl "/etc/pam_ldap.conf"
42 let xfm = transform lns filter