1
(* MySQL module for Augeas *)
2
(* Author: Tim Stoop <tim@kumina.nl> *)
3
(* Heavily based on php.aug by Raphael Pinson *)
4
(* <raphink@gmail.com> *)
10
(************************************************************************
12
*************************************************************************)
13
let comment = IniFile.comment IniFile.comment_re "#"
15
let sep = IniFile.sep IniFile.sep_re IniFile.sep_default
17
let entry = [ key IniFile.entry_re . sep . IniFile.sto_to_comment . (comment|IniFile.eol) ] |
18
[ key IniFile.entry_re . store // . (comment|IniFile.eol) ] |
19
[ key /\![A-Za-z][A-Za-z0-9\._-]+/ . del / / " " . store /\/[A-Za-z0-9\.\/_-]+/ . (comment|IniFile.eol) ] |
22
(************************************************************************
23
* sections, led by a "[section]" header
24
* We can't use titles as node names here since they could contain "/"
25
* We remove #comment from possible keys
26
* since it is used as label for comments
27
* We also remove / as first character
28
* because augeas doesn't like '/' keys (although it is legal in INI Files)
29
*************************************************************************)
30
let title = IniFile.indented_title_label "target" IniFile.record_label_re
31
let record = IniFile.record title entry
33
let lns = IniFile.lns record comment
35
let filter = (incl "/etc/mysql/my.cnf")
36
. (incl "/etc/mysql/conf.d/*.cnf")
39
let xfm = transform lns filter