summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-4.0.24-r2.rc6')
-rw-r--r--mysql-4.0.24-r2.rc671
1 files changed, 0 insertions, 71 deletions
diff --git a/mysql-4.0.24-r2.rc6 b/mysql-4.0.24-r2.rc6
deleted file mode 100644
index ec22177..0000000
--- a/mysql-4.0.24-r2.rc6
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/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-4.0.24-r2.rc6,v 1.1 2005/05/17 09:08:46 robbat2 Exp $
-
-depend() {
- use dns net
-}
-
-getconfig() {
- MY_CNF=${MY_CNF=/etc/mysql/my.cnf}
- if [ ! -f ${MY_CNF} ]; then
- eerror "No ${MY_CNF} file exists! Using automatic defaults!"
- fi
-
- #dir=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'`
- #dir=`my_print_defaults mysqld | sed -ne '/datadir/s|^--datadir=||p' | tail -n1`
- local mysqld_cnf="`my_print_defaults --config-file=${MY_CNF} mysqld`"
- datadir=`echo "${mysqld_cnf}" | sed -ne '/datadir/s|^--datadir=||p' | tail -n1`
- pidfile=`echo "${mysqld_cnf}" | sed -ne '/pid-file/s|^--pid-file=||p' | tail -n1`
- basedir=`echo "${mysqld_cnf}" | sed -ne '/basedir/s|^--basedir=||p' | tail -n1`
- socket=`echo "${mysqld_cnf}" | sed -ne '/socket/s|^--socket=||p' | tail -n1`
-
- # push these out to the script
- export MY_CNF
- export pidfile
- export datadir
- export basedir
- export socket
-}
-
-checkconfig() {
- getconfig
- if [ -z "${datadir}" ]; then
- eerror "Your mysql doesn't have any datadir setting, default or specific"
- eerror "Please check your my.cnf : ${MY_CNF}"
- return 1
- fi
-
- if [ ! -d "$datadir/mysql" ]; then
- eerror "You don't appear to have the mysql database installed yet."
- eerror "Please run /usr/bin/mysql_install_db to have this done..."
- return 1
- fi
-}
-
-start() {
- local retstatus=1
- local maxtry=5
- getconfig
- checkconfig || return 1
- ebegin "Starting mysqld (${MY_CNF})"
- start-stop-daemon --start --quiet --background \
- --exec "${basedir}/bin/mysqld_safe" \
- -- --defaults-file=${MY_CNF} >/dev/null 2>&1
- retstatus=$?
- while ! [[ -S "${socket}" || "${maxtry}" -lt "1" || "${retstatus}" -gt "0" ]] ; do
- maxtry=$(($maxtry-1))
- echo -n "."
- sleep 1
- done
- ! [[ -S "${socket}" ]] && eerror "MySQL NOT started, proceding anyway"
- eend $retstatus
-}
-
-stop () {
- getconfig
- ebegin "Stopping mysqld (${MY_CNF})"
- start-stop-daemon --stop --retry 5 --quiet --pidfile=${pidfile}
- eend $?
-}