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 let flag = [ key /[A-Za-z0-9._-]+(\[[0-9]+\])?/ . Util.doseol ]
29 (************************************************************************
31 *************************************************************************)
33 let lns = (comment|empty|entry|flag)*
35 let simple_lns = lns (* An alias for compatibility reasons *)
37 (* configuration files that can be parsed without customizing the lens *)
38 let filter = incl "/etc/havp/havp.config"
39 . incl "/etc/ldap.conf"
40 . incl "/etc/ldap/ldap.conf"
41 . incl "/etc/libnss-ldap.conf"
42 . incl "/etc/pam_ldap.conf"
44 let xfm = transform lns filter