[augeas-devel] [PATCH 2 of 2] Add mysql.aug and associated test

Raphael Pinson raphink at gmail.com
Wed Aug 13 16:54:23 UTC 2008


# HG changeset patch
# User Raphael Pinson <raphink at gmail.com>
# Date 1218646448 -7200
# Node ID 5ffd91266dc16dae7d48c8bc96d00304a4d8bb0b
# Parent  6f492eaaa453856246c5ffa79ffd1c8e06939261
Add mysql.aug and associated test

diff -r 6f492eaaa453 -r 5ffd91266dc1 lenses/mysql.aug
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lenses/mysql.aug	Wed Aug 13 18:54:08 2008 +0200
@@ -0,0 +1,26 @@
+(* MySQL module for Augeas                      *)
+(* Author: Raphael Pinson <raphink at gmail.com> *)
+(*                                            *)
+
+module MySQL =
+
+    autoload xfm
+
+(* my.cnf is a standard INI file *)
+let comment    = IniFile.comment
+let empty      = IniFile.empty
+
+let entry      = IniFile.entry /[a-z][a-z0-9\._-]+/
+
+let record     = IniFile.record "section" entry 
+let includedir = [ label "includedir" . Util.del_str "!includedir"
+                 . Util.del_ws_spc . store /([^ \t\n].*[^ \t\n]|[^ \t\n])/
+		 . IniFile.eol ]
+
+let lns        = IniFile.lns ( record | ( includedir . ( comment | empty )* ) )
+
+let filter = (incl "/etc/mysql/my.cnf")
+             . Util.stdexcl
+
+let xfm = transform lns filter
+
diff -r 6f492eaaa453 -r 5ffd91266dc1 lenses/tests/test_mysql.aug
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lenses/tests/test_mysql.aug	Wed Aug 13 18:54:08 2008 +0200
@@ -0,0 +1,30 @@
+
+module Test_mysql =
+
+let conf = "
+[mysql]
+#no-auto-rehash # faster start of mysql but no tab completition
+
+[isamchk]
+key_buffer              = 16M
+
+#
+# * NDB Cluster
+#
+# See /usr/share/doc/mysql-server-*/README.Debian for more information.
+#
+# The following configuration is read by the NDB Data Nodes (ndbd processes)
+# not from the NDB Management Nodes (ndb_mgmd processes).
+#
+# [MYSQL_CLUSTER]
+# ndb-connectstring=127.0.0.1
+
+
+#
+# * IMPORTANT: Additional settings that can override those from this file!
+#
+!includedir /etc/mysql/conf.d/
+
+"
+
+  test MySQL.lns get conf = ?




More information about the augeas-devel mailing list