Bump to 1.14.1
[platform/upstream/augeas.git] / lenses / gdm.aug
1 (* Gdm module for Augeas                       *)
2 (* Author: Free Ekanayaka <freek@64studio.com> *)
3 (*                                             *)
4
5 module Gdm =
6   autoload xfm
7
8 (************************************************************************
9  * INI File settings
10  *************************************************************************)
11
12 let comment  = IniFile.comment IniFile.comment_re IniFile.comment_default
13 let sep      = IniFile.sep IniFile.sep_re IniFile.sep_default
14 let empty    = IniFile.empty
15
16
17 (************************************************************************
18  *                        ENTRY
19  * Entry keywords can be bare digits as well (the [server] section)
20  *************************************************************************)
21 let entry_re = ( /[A-Za-z0-9][A-Za-z0-9._-]*/ )
22 let entry    = IniFile.entry entry_re sep comment
23
24
25 (************************************************************************
26  *                         TITLE
27  *
28  * We use IniFile.title_label because there can be entries
29  * outside of sections whose labels would conflict with section names
30  *************************************************************************)
31 let title       = IniFile.title ( IniFile.record_re - ".anon" )
32 let record      = IniFile.record title entry
33
34 let record_anon = [ label ".anon" . ( entry | empty )+ ]
35
36
37 (************************************************************************
38  *                         LENS & FILTER
39  * There can be entries before any section
40  * IniFile.entry includes comment management, so we just pass entry to lns
41  *************************************************************************)
42 let lns    = record_anon? . record*
43
44 let filter = (incl "/etc/gdm/gdm.conf*")
45            . (incl "/etc/gdm/custom.conf")
46            . Util.stdexcl
47
48 let xfm = transform lns filter