1 (* Gdm module for Augeas *)
2 (* Author: Free Ekanayaka <freek@64studio.com> *)
8 (************************************************************************
10 *************************************************************************)
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
17 (************************************************************************
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
25 (************************************************************************
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
34 let record_anon = [ label ".anon" . ( entry | empty )+ ]
37 (************************************************************************
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*
44 let filter = (incl "/etc/gdm/gdm.conf*")
45 . (incl "/etc/gdm/custom.conf")
48 let xfm = transform lns filter