Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Apr 2013 20:47:28 +0000 (UTC)
From:      Florian Smeets <flo@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r316637 - in head/databases: percona55-server/files percona56-server/files
Message-ID:  <201304262047.r3QKlSWT043920@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: flo
Date: Fri Apr 26 20:47:28 2013
New Revision: 316637
URL: http://svnweb.freebsd.org/changeset/ports/316637

Log:
  Merge optimizations to the rc script from r316439 and r316532.

Modified:
  head/databases/percona55-server/files/mysql-server.in
  head/databases/percona56-server/files/mysql-server.in   (contents, props changed)

Modified: head/databases/percona55-server/files/mysql-server.in
==============================================================================
--- head/databases/percona55-server/files/mysql-server.in	Fri Apr 26 20:44:59 2013	(r316636)
+++ head/databases/percona55-server/files/mysql-server.in	Fri Apr 26 20:47:28 2013	(r316637)
@@ -16,6 +16,8 @@
 #			just before mysql starts.
 # mysql_dbdir (str):	Default to "/var/db/mysql"
 #			Base database directory.
+# mysql_optfile (str):	Server-specific option file.
+#			Default to "${mysql_dbdir}/my.cnf".
 # mysql_pidfile (str):	Custum PID file path and name.
 #			Default to "${mysql_dbdir}/${hostname}.pid".
 # mysql_args (str):	Custom additional arguments to be passed
@@ -32,12 +34,14 @@ load_rc_config $name
 : ${mysql_enable="NO"}
 : ${mysql_limits="NO"}
 : ${mysql_dbdir="/var/db/mysql"}
+: ${mysql_optfile="${mysql_dbdir}/my.cnf"}
 
 mysql_user="mysql"
 mysql_limits_args="-e -U ${mysql_user}"
-pidfile=${mysql_pidfile:-"${mysql_dbdir}/`/bin/hostname`.pid"}
+: ${hostname:=`/bin/hostname`}
+pidfile=${mysql_pidfile:-"${mysql_dbdir}/${hostname}.pid"}
 command="/usr/sbin/daemon"
-command_args="-c -f %%PREFIX%%/bin/mysqld_safe --defaults-extra-file=${mysql_dbdir}/my.cnf --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args}"
+command_args="-c -f %%PREFIX%%/bin/mysqld_safe --defaults-extra-file=${mysql_optfile} --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args}"
 procname="%%PREFIX%%/libexec/mysqld"
 start_precmd="${name}_prestart"
 start_postcmd="${name}_poststart"

Modified: head/databases/percona56-server/files/mysql-server.in
==============================================================================
--- head/databases/percona56-server/files/mysql-server.in	Fri Apr 26 20:44:59 2013	(r316636)
+++ head/databases/percona56-server/files/mysql-server.in	Fri Apr 26 20:47:28 2013	(r316637)
@@ -16,6 +16,8 @@
 #			just before mysql starts.
 # mysql_dbdir (str):	Default to "/var/db/mysql"
 #			Base database directory.
+# mysql_optfile (str):	Server-specific option file.
+#			Default to "${mysql_dbdir}/my.cnf".
 # mysql_pidfile (str):	Custum PID file path and name.
 #			Default to "${mysql_dbdir}/${hostname}.pid".
 # mysql_args (str):	Custom additional arguments to be passed
@@ -32,12 +34,14 @@ load_rc_config $name
 : ${mysql_enable="NO"}
 : ${mysql_limits="NO"}
 : ${mysql_dbdir="/var/db/mysql"}
+: ${mysql_optfile="${mysql_dbdir}/my.cnf"}
 
 mysql_user="mysql"
 mysql_limits_args="-e -U ${mysql_user}"
-pidfile=${mysql_pidfile:-"${mysql_dbdir}/`/bin/hostname`.pid"}
+: ${hostname:=`/bin/hostname`}
+pidfile=${mysql_pidfile:-"${mysql_dbdir}/${hostname}.pid"}
 command="/usr/sbin/daemon"
-command_args="-c -f %%PREFIX%%/bin/mysqld_safe --defaults-extra-file=${mysql_dbdir}/my.cnf --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args}"
+command_args="-c -f %%PREFIX%%/bin/mysqld_safe --defaults-extra-file=${mysql_optfile} --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args}"
 procname="%%PREFIX%%/libexec/mysqld"
 start_precmd="${name}_prestart"
 start_postcmd="${name}_poststart"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304262047.r3QKlSWT043920>