diff options
Diffstat (limited to 'databases')
-rw-r--r-- | databases/mysql5-server/Makefile | 4 | ||||
-rw-r--r-- | databases/mysql5-server/files/mysqld.sh | 15 |
2 files changed, 14 insertions, 5 deletions
diff --git a/databases/mysql5-server/Makefile b/databases/mysql5-server/Makefile index 2aaef357089..b0142aa8d5a 100644 --- a/databases/mysql5-server/Makefile +++ b/databases/mysql5-server/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.25 2008/09/18 11:51:37 taca Exp $ +# $NetBSD: Makefile,v 1.26 2009/02/04 21:17:45 he Exp $ PKGNAME= ${DISTNAME:S/-/-server-/} -#PKGREVISION= 1 +PKGREVISION= 1 SVR4_PKGNAME= mysqs COMMENT= MySQL 5, a free SQL database (server) diff --git a/databases/mysql5-server/files/mysqld.sh b/databases/mysql5-server/files/mysqld.sh index f222a72874a..b7305032654 100644 --- a/databases/mysql5-server/files/mysqld.sh +++ b/databases/mysql5-server/files/mysqld.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: mysqld.sh,v 1.2 2007/06/13 13:24:07 xtraeme Exp $ +# $NetBSD: mysqld.sh,v 1.3 2009/02/04 21:17:45 he Exp $ # # PROVIDE: mysqld # REQUIRE: DAEMON LOGIN mountall @@ -27,13 +27,19 @@ procname="@PREFIX@/libexec/${name}" : ${mysqld_user:=@MYSQL_USER@} : ${mysqld_group:=@MYSQL_GROUP@} : ${mysqld_datadir:=@MYSQL_DATADIR@} -pidfile="${mysqld_datadir}/`@HOSTNAME_CMD@`.pid" extra_commands="initdb" initdb_cmd="mysqld_initdb" start_precmd="mysqld_precmd" start_cmd="mysqld_start" +# Don't drop thread priority unless on Linux or SunOS +# ref. http://bugs.mysql.com/bug.php?id=18526 +case $(uname -s) in + Linux|SunOS) thread_flags="";; + *) thread_flags="--skip-thread-priority" +esac + mysqld_precmd() { if [ ! -d ${mysqld_datadir}/mysql ]; then @@ -75,16 +81,19 @@ mysqld_start() ulimit -n 4096 cd @PREFIX@ ${command} --user=${mysqld_user} --datadir=${mysqld_datadir} \ - --pid-file=${pidfile} ${mysqld_flags} & + --pid-file=${pidfile} ${mysqld_flags} \ + ${thread_flags} & } if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then load_rc_config $name + pidfile="${mysqld_datadir}/`@HOSTNAME_CMD@`.pid" run_rc_command "$1" else if [ -f /etc/rc.conf ]; then . /etc/rc.conf fi + pidfile="${mysqld_datadir}/`@HOSTNAME_CMD@`.pid" case "$1" in initdb) eval ${initdb_cmd} |