From 291085c4f88be0e8169cda45070e5e0dee7fdbce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com> Date: Tue, 26 Jan 2010 13:25:55 +0000 Subject: [PATCH] - cleanup and share more configuration git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31975 20353a03-c40f-0410-a6d1-a30d3c3de9de --- buildout/development.cfg | 1 - buildout/mysql-instance/buildout.cfg | 19 +++++++------------ buildout/mysql-instance/templates/mysqld.in | 2 +- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/buildout/development.cfg b/buildout/development.cfg index 8a16c59c66..92f526e9ee 100644 --- a/buildout/development.cfg +++ b/buildout/development.cfg @@ -1,6 +1,5 @@ [buildout] extends = official.cfg -mysql_datadir = ${buildout:directory}/var/mysql parts += mysql-bin diff --git a/buildout/mysql-instance/buildout.cfg b/buildout/mysql-instance/buildout.cfg index c772523474..6b1f9294b5 100644 --- a/buildout/mysql-instance/buildout.cfg +++ b/buildout/mysql-instance/buildout.cfg @@ -13,6 +13,11 @@ parts = [configuration] mysql_port = 10002 mysql_host = 127.0.0.1 +mysql_datadir = ${buildout:directory}/var/mysql +mysql_pid = ${:mysql_datadir}/mysql.pid +mysql_sock = ${:mysql_datadir}/mysql.sock +# XXX/TODO: mysql_error_log shall be in var/log +mysql_error_log = ${buildout:directory}/var/mysql.err.log [mysql-bin] recipe = collective.recipe.template @@ -32,7 +37,7 @@ output = ${buildout:directory}/bin/mysqld [mysql-instance] recipe = plone.recipe.command command = - ${software_definition:mysql_software}/bin/mysql_install_db --datadir=${mycnf:datadir} + ${software_definition:mysql_software}/bin/mysql_install_db --datadir=${configuration:mysql_datadir} update-command = ${:command} [start-mysql-instance] @@ -42,15 +47,5 @@ update-command = ${:command} [stop-mysql-instance] recipe = plone.recipe.command -command = kill `cat ${mycnf:pid}` +command = kill `cat ${configuration:mysql_pid}` update-command = ${:command} - -[mycnf] -recipe = plone.recipe.command -command = -basedir=${software_definition:mysql_software} -datadir=${buildout:mysql_datadir} -# files shall be in better places -pid=${:datadir}/mysql.pid -err = ${buildout:directory}/var/mysql.err.log -sock = ${:datadir}/mysql.sock diff --git a/buildout/mysql-instance/templates/mysqld.in b/buildout/mysql-instance/templates/mysqld.in index 61d4859286..d27490b034 100755 --- a/buildout/mysql-instance/templates/mysqld.in +++ b/buildout/mysql-instance/templates/mysqld.in @@ -1,3 +1,3 @@ #!/bin/sh -${software_definition:mysql_software}/bin/mysqld_safe --no-defaults --port=${configuration:mysql_port} --pid-file=${mycnf:pid} --log-error=${mycnf:err} --basedir=${mycnf:basedir} --datadir=${mycnf:datadir} --socket=${mycnf:sock} +${software_definition:mysql_software}/bin/mysqld_safe --no-defaults --port=${configuration:mysql_port} --pid-file=${configuration:mysql_pid} --log-error=${configuration:mysql_error_log} --basedir=${software_definition:mysql_software} --datadir=${configuration:mysql_datadir} --socket=${configuration:mysql_sock} -- 2.30.9