|
Packit Service |
a2ae7a |
(* Darkice module for Augeas
|
|
Packit Service |
a2ae7a |
Author: Free Ekanayaka <free@64studio.com>
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
Reference: man 5 darkice.cfg
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
module Darkice =
|
|
Packit Service |
a2ae7a |
autoload xfm
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(************************************************************************
|
|
Packit Service |
a2ae7a |
* INI File settings
|
|
Packit Service |
a2ae7a |
*************************************************************************)
|
|
Packit Service |
a2ae7a |
let comment = IniFile.comment IniFile.comment_re IniFile.comment_default
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let sep = IniFile.sep IniFile.sep_re IniFile.sep_default
|
|
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 |
let title = IniFile.title_label "target" IniFile.record_label_re
|
|
Packit Service |
a2ae7a |
let record = IniFile.record title entry
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let lns = IniFile.lns record comment
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let filter = (incl "/etc/darkice.cfg")
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let xfm = transform lns filter
|