Imported Upstream version 1.7.0
[platform/upstream/augeas.git] / lenses / lightdm.aug
1 (* 
2 Module: Lightdm
3   Lightdm module for Augeas for which parses /etc/lightdm/*.conf files which
4   are standard INI file format.
5
6 Author: David Salmen <dsalmen@dsalmen.com>
7
8 About: License
9    This file is licenced under the LGPL v2+, like the rest of Augeas.
10
11 About: Lens Usage
12    To be documented
13
14 About: Configuration files
15    This lens applies to /etc/lightdm/*.conf.  See <filter>.
16
17 About: Tests
18    The tests/test_lightdm.aug file contains unit tests.
19 *)
20
21 module Lightdm =
22   autoload xfm
23
24 (************************************************************************
25  * INI File settings
26  *
27  * lightdm.conf only supports "# as commentary and "=" as separator
28  *************************************************************************)
29 let comment    = IniFile.comment "#" "#"
30 let sep        = IniFile.sep "=" "="
31
32
33 (************************************************************************
34  *                        ENTRY
35  * lightdm.conf uses standard INI File entries
36  *************************************************************************)
37 let entry   = IniFile.indented_entry IniFile.entry_re sep comment
38
39
40 (************************************************************************
41  *                        RECORD
42  * lightdm.conf uses standard INI File records
43  *************************************************************************)
44 let title   = IniFile.indented_title IniFile.record_re
45 let record  = IniFile.record title entry
46
47
48 (************************************************************************
49  *                        LENS & FILTER
50  * lightdm.conf uses standard INI File records
51  *************************************************************************)
52 let lns     = IniFile.lns record comment
53
54 let filter = (incl "/etc/lightdm/*.conf")
55
56 let xfm = transform lns filter