Date: Sat, 6 Oct 2012 17:48:38 GMT From: Daniel Ylitalo <daniel@produktion203.se> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/172408: Allow to specify my.cnf path in /etc/rc.conf Message-ID: <201210061748.q96HmcJU087344@red.freebsd.org> Resent-Message-ID: <201210061750.q96HoPdx082551@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 172408 >Category: ports >Synopsis: Allow to specify my.cnf path in /etc/rc.conf >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Oct 06 17:50:24 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Daniel Ylitalo >Release: 9.0-p4 >Organization: 203 Web Group AB >Environment: FreeBSD xxxx.myserver.com 9.0-RELEASE-p4 FreeBSD 9.0-RELEASE-p4 #0: Fri Oct 5 22:26:18 CEST 2012 daniel@xxxx.myserver.com:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Right now you have to have the my.cnf file in your dbdir, which isnt optimal in all cases (for example when using a deploysystem that handles all the configfiles) >How-To-Repeat: >Fix: Attached as patch Patch attached with submission follows: *** /usr/local/etc/rc.d/mysql-server Fri Sep 21 04:02:03 2012 --- /usr/local/etc/rc.d/mysql-server Sat Oct 6 13:43:40 2012 *************** *** 30,45 **** load_rc_config $name : ${mysql_enable="NO"} : ${mysql_limits="NO"} : ${mysql_dbdir="/var/db/mysql"} mysql_user="mysql" mysql_limits_args="-e -U ${mysql_user}" pidfile=${mysql_pidfile:-"${mysql_dbdir}/`/bin/hostname`.pid"} command="/usr/sbin/daemon" ! command_args="-c -f /usr/local/bin/mysqld_safe --defaults-extra-file=${mysql_dbdir}/my.cnf --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args}" procname="/usr/local/libexec/mysqld" start_precmd="${name}_prestart" start_postcmd="${name}_poststart" mysql_install_db="/usr/local/bin/mysql_install_db" mysql_install_db_args="--basedir=/usr/local --datadir=${mysql_dbdir} --force" --- 30,46 ---- load_rc_config $name : ${mysql_enable="NO"} : ${mysql_limits="NO"} : ${mysql_dbdir="/var/db/mysql"} + : ${mysql_configfile="${mysql_dbdir}/my.cnf"} mysql_user="mysql" mysql_limits_args="-e -U ${mysql_user}" pidfile=${mysql_pidfile:-"${mysql_dbdir}/`/bin/hostname`.pid"} command="/usr/sbin/daemon" ! command_args="-c -f /usr/local/bin/mysqld_safe --defaults-extra-file=${mysql_configfile} --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args}" procname="/usr/local/libexec/mysqld" start_precmd="${name}_prestart" start_postcmd="${name}_poststart" mysql_install_db="/usr/local/bin/mysql_install_db" mysql_install_db_args="--basedir=/usr/local --datadir=${mysql_dbdir} --force" >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210061748.q96HmcJU087344>