diff options
-rw-r--r-- | databases/mysql56-server/Makefile | 2 | ||||
-rw-r--r-- | databases/mysql56-server/files/mysql-server.in | 30 |
2 files changed, 7 insertions, 25 deletions
diff --git a/databases/mysql56-server/Makefile b/databases/mysql56-server/Makefile index 50d3e403d622..162bd5639f47 100644 --- a/databases/mysql56-server/Makefile +++ b/databases/mysql56-server/Makefile @@ -3,7 +3,7 @@ PORTNAME?= mysql PORTVERSION= 5.6.35 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= databases ipv6 MASTER_SITES= MYSQL/MySQL-5.6 PKGNAMESUFFIX?= 56-server diff --git a/databases/mysql56-server/files/mysql-server.in b/databases/mysql56-server/files/mysql-server.in index a3041e6478ce..b5015e5505f3 100644 --- a/databases/mysql56-server/files/mysql-server.in +++ b/databases/mysql56-server/files/mysql-server.in @@ -14,12 +14,10 @@ # mysql_limits (bool): Set to "NO" by default. # Set it to yes to run `limits -e -U mysql` # just before mysql starts. -# mysql_dbdir (str): Default to "%%MY_DBDIR%%" +# mysql_dbdir (str): Default to "/var/db/mysql" # Base database directory. -# mysql_confdir (str): Default to "%%ETCDIR%%" -# Base configuration directory. # mysql_optfile (str): Server-specific option file. -# Default to "${mysql_confdir}/my.cnf". +# 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 @@ -35,25 +33,20 @@ load_rc_config $name : ${mysql_enable="NO"} : ${mysql_limits="NO"} -: ${mysql_dbdir="%%MY_DBDIR%%"} -: ${mysql_confdir="%%ETCDIR%%"} -if [ -f "${mysql_dbdir}/my.cnf" ]; then +: ${mysql_dbdir="/var/db/mysql"} : ${mysql_optfile="${mysql_dbdir}/my.cnf"} -else -: ${mysql_optfile="${mysql_confdir}/my.cnf"} -fi mysql_user="mysql" mysql_limits_args="-e -U ${mysql_user}" : ${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_optfile} --basedir=%%PREFIX%% --datadir=${mysql_dbdir} --pid-file=${pidfile} --user=${mysql_user} ${mysql_args} %%PERFSCHEMRC%%" +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" mysql_install_db="%%PREFIX%%/bin/mysql_install_db" -mysql_install_db_args="--defaults-extra-file=${mysql_optfile} --basedir=%%PREFIX%% --datadir=${mysql_dbdir} --user=${mysql_user} --force" +mysql_install_db_args="--basedir=%%PREFIX%% --defaults-extra-file=${mysql_optfile} --datadir=${mysql_dbdir} --force" mysql_create_auth_tables() { @@ -63,18 +56,7 @@ mysql_create_auth_tables() mysql_prestart() { - if [ -f "${mysql_dbdir}/my.cnf" ]; then - echo "" - echo "Please keep in mind that the default location for my.cnf has changed" - echo "from \"%%MY_DBDIR%%/my.cnf\" to \"%%ETCDIR%%/my.cnf\". " - echo "Please merge your existing my.cnf with the new default and move" - echo "it to \"%%ETCDIR%%/my.cnf\"." - echo "If you do not want to move your my.cnf to the new location then" - echo "you must set \"mysql_optfile\" in /etc/rc.conf to \"/var/db/mysql/my.cnf\"." - echo "" - fi - - if [ ! -d "${mysql_dbdir}/mysql" ]; then + if [ ! -d "${mysql_dbdir}/mysql/." ]; then mysql_create_auth_tables || return 1 fi if checkyesno mysql_limits; then |