|
Packit Service |
a2ae7a |
(* Gdm module for Augeas *)
|
|
Packit Service |
a2ae7a |
(* Author: Free Ekanayaka <freek@64studio.com> *)
|
|
Packit Service |
a2ae7a |
(* *)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
module Gdm =
|
|
Packit Service |
a2ae7a |
autoload xfm
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(************************************************************************
|
|
Packit Service |
a2ae7a |
* INI File settings
|
|
Packit Service |
a2ae7a |
*************************************************************************)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let comment = IniFile.comment IniFile.comment_re IniFile.comment_default
|
|
Packit Service |
a2ae7a |
let sep = IniFile.sep IniFile.sep_re IniFile.sep_default
|
|
Packit Service |
a2ae7a |
let empty = IniFile.empty
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(************************************************************************
|
|
Packit Service |
a2ae7a |
* ENTRY
|
|
Packit Service |
a2ae7a |
* Entry keywords can be bare digits as well (the [server] section)
|
|
Packit Service |
a2ae7a |
*************************************************************************)
|
|
Packit Service |
a2ae7a |
let entry_re = ( /[A-Za-z0-9][A-Za-z0-9._-]*/ )
|
|
Packit Service |
a2ae7a |
let entry = IniFile.entry entry_re sep comment
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(************************************************************************
|
|
Packit Service |
a2ae7a |
* TITLE
|
|
Packit Service |
a2ae7a |
*
|
|
Packit Service |
a2ae7a |
* We use IniFile.title_label because there can be entries
|
|
Packit Service |
a2ae7a |
* outside of sections whose labels would conflict with section names
|
|
Packit Service |
a2ae7a |
*************************************************************************)
|
|
Packit Service |
a2ae7a |
let title = IniFile.title ( IniFile.record_re - ".anon" )
|
|
Packit Service |
a2ae7a |
let record = IniFile.record title entry
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let record_anon = [ label ".anon" . ( entry | empty )+ ]
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(************************************************************************
|
|
Packit Service |
a2ae7a |
* LENS & FILTER
|
|
Packit Service |
a2ae7a |
* There can be entries before any section
|
|
Packit Service |
a2ae7a |
* IniFile.entry includes comment management, so we just pass entry to lns
|
|
Packit Service |
a2ae7a |
*************************************************************************)
|
|
Packit Service |
a2ae7a |
let lns = record_anon? . record*
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let filter = (incl "/etc/gdm/gdm.conf*")
|
|
Packit Service |
a2ae7a |
. (incl "/etc/gdm/custom.conf")
|
|
Packit Service |
a2ae7a |
. Util.stdexcl
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let xfm = transform lns filter
|