diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-05-13 21:02:43 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-05-13 21:02:43 +0300 |
commit | 2ccc9f182ace325dd4bcbf7f549e010a77900dfe (patch) | |
tree | 8825808291a3759badf170df9fde4fb6e4431ddf /dev-db/mysql/files/mysql.init | |
parent | 1c2f20daf6b2baa968e6139fe7c161308b089baf (diff) |
new file: dev-db/mysql/files/my.cnf
new file: dev-db/mysql/files/my.cnf-4.0
new file: dev-db/mysql/files/my.cnf-4.1
new file: dev-db/mysql/files/my.cnf-5.1
new file: dev-db/mysql/files/mysql-5.1-gcc45-apicheck.patch
new file: dev-db/mysql/files/mysql.init
new file: dev-db/mysql/mysql-5.1.46-r1.ebuild
modified: dev-libs/glib/glib-2.9999.ebuild
Diffstat (limited to 'dev-db/mysql/files/mysql.init')
-rwxr-xr-x | dev-db/mysql/files/mysql.init | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/dev-db/mysql/files/mysql.init b/dev-db/mysql/files/mysql.init new file mode 100755 index 0000000..16ea7bc --- /dev/null +++ b/dev-db/mysql/files/mysql.init @@ -0,0 +1,37 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/mysql.init,v 1.7 2004/07/14 21:41:15 agriffis Exp $ + +depend() { + need net + use dns +} + +checkconfig() { + if [ ! -f /etc/mysql/my.cnf ] ; then + eerror "No /etc/mysql/my.cnf file exists!" + fi + + dir=`my_print_defaults mysqld | grep -- --datadir | sed -e "s|^.*=\(.*\)|\1|"` + + if [ ! -d $dir/mysql ] ; then + eerror "You dont appear to have the mysql database installed yet." + eerror "Please run /usr/bin/mysql_install_db to have this done..." + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting mysqld" + /usr/bin/safe_mysqld >/dev/null 2>&1 & + eend $? +} + +stop () { + ebegin "Stopping mysqld" + start-stop-daemon --stop --quiet \ + --pidfile=/var/run/mysqld/mysqld.pid --retry 20 + eend $? +} |