[Lunar-commits] <moonbase> Revert "mysql: move it to zdeprecated."
Florin Braescu
florin at lunar-linux.org
Fri Feb 19 17:02:42 CET 2010
commit 15e80e5cbd113742f978436ea018e0cd38d5cbb9
Author: Florin Braescu <florin at lunar-linux.org>
Date: Fri Feb 19 18:02:42 2010 +0200
Revert "mysql: move it to zdeprecated."
This reverts commit a7ebd3bd29253fa486cd297dce6507fa9a9c0d1f.
mysql: let it rest in sql.
Ratler suggested another method to help migrate to the new mysql.
---
sql/mysql/BUILD | 57 +++++++++++
sql/mysql/CONFIGURE | 63 ++++++++++++
sql/mysql/DEPENDS | 2 +
sql/mysql/DETAILS | 18 ++++
sql/mysql/POST_INSTALL | 14 +++
sql/mysql/init.d/mysqld | 200 +++++++++++++++++++++++++++++++++++++++
sql/mysql/services | 1 +
zdeprecated/mysql/BUILD | 57 -----------
zdeprecated/mysql/CONFIGURE | 63 ------------
zdeprecated/mysql/DEPENDS | 2 -
zdeprecated/mysql/DETAILS | 18 ----
zdeprecated/mysql/POST_INSTALL | 14 ---
zdeprecated/mysql/init.d/mysqld | 200 ---------------------------------------
zdeprecated/mysql/services | 1 -
14 files changed, 355 insertions(+), 355 deletions(-)
diff --git a/sql/mysql/BUILD b/sql/mysql/BUILD
new file mode 100644
index 0000000..a9bd692
--- /dev/null
+++ b/sql/mysql/BUILD
@@ -0,0 +1,57 @@
+(
+
+ add_priv_user mysql:mysql &&
+ devoke_installwatch &&
+
+ if [ "`arch`" == "alpha" ]; then
+ export CFLAGS="$CFLAGS -fPIC"
+ export CXXFLAGS="$CXXFLAGS -fPIC"
+ fi &&
+
+ if [ "`arch`" == "x86_64" ]; then
+ export CFLAGS="$CFLAGS -fPIC"
+ export CXXFLAGS="$CXXFLAGS -fPIC"
+ fi &&
+
+ export CXX='gcc' &&
+
+ ./configure --prefix=/usr \
+ --disable-dependency-tracking \
+ --without-bench \
+ --without-debug \
+ --without-readline \
+ --without-libedit \
+ --enable-thread-safe-client \
+ --enable-assembler \
+ --localstatedir=/var/lib/mysql \
+ --infodir=/usr/share/info \
+ --mandir=/usr/share/man \
+ --with-pthread \
+ $OPTS &&
+ invoke_installwatch &&
+
+ make pkglibdir=/usr/lib ||
+ {
+ MYSQL_EXIT=$?
+ message ""
+ message "Compilation of mysql failed."
+ message ""
+ message "If you are getting error about 'read_cr4/write_cr4' and/or 'set_in_cr4'"
+ message "note that this is not a mysql bug."
+ message ""
+ message "To fix this please edit the include file that reports the errors and"
+ message "encapsulate the 'set_in_cr4' function with '#ifdef __KERNEL__'/'#endif'."
+ message ""
+ exit $MYSQL_EXIT;
+ }
+ prepare_install &&
+ mkdir -p /var/lib/mysql &&
+ make pkglibdir=/usr/lib install &&
+ rm -rf /usr/mysql-test &&
+
+ if [ -x /etc/init.d/mysql.server ]; then
+ rm -f /etc/init.d/mysql.server
+ rm -f /etc/rc?.d/???mysql.server
+ fi
+
+) > $C_FIFO 2>&1
diff --git a/sql/mysql/CONFIGURE b/sql/mysql/CONFIGURE
new file mode 100644
index 0000000..a96ff3f
--- /dev/null
+++ b/sql/mysql/CONFIGURE
@@ -0,0 +1,63 @@
+if ! grep -q CONFIGURED $MODULE_CONFIG; then
+
+ if query "Install client only? " n; then
+ OPTS="$OPTS --without-server"
+ else
+ if query "Enable InnoDB Support? Needed by KDE4/Akonadi " n; then
+ OPTS="$OPTS --with-innodb"
+ else
+ OPTS="$OPTS --without-innodb"
+ fi
+
+ if query "Enable BDB Support? " n; then
+ OPTS="$OPTS --with-berkeley-db"
+ else
+ OPTS="$OPTS --without-berkeley-db"
+ fi
+
+ if query "Enable RAID Support? " n; then
+ OPTS="$OPTS --with-raid"
+ else
+ OPTS="$OPTS --without-raid"
+ fi
+
+ if query "Include the Virtual IO support? " n; then
+ OPTS="$OPTS --with-vio"
+ else
+ OPTS="$OPTS --without-vio"
+ fi
+
+ if query "Include the NDB Cluster table handler? " n; then
+ OPTS="$OPTS --with-ndbcluster"
+ else
+ OPTS="$OPTS --without-ndbcluster"
+ fi
+
+ if query "Support tables with more than 4 G rows even on 32 bit platforms? " n; then
+ OPTS="$OPTS --with-big-tables"
+ else
+ OPTS="$OPTS --without-big-tables"
+ fi
+ fi
+
+ if query "Include the OpenSSL support? " n; then
+ OPTS="$OPTS --with-openssl"
+ fi
+
+ if query "Build embedded server (libmysqld), needed by KDE4 ? " n; then
+ OPTS="$OPTS --with-embedded-server"
+ else
+ OPTS="$OPTS --without-embedded-server"
+ fi
+
+ if query "Enable all character sets? " y; then
+ OPTS="$OPTS --with-extra-charsets=all"
+ elif query "Enable just complex character sets? " y; then
+ OPTS="$OPTS --with-extra-charsets=complex"
+ else
+ OPTS="$OPTS --disable-nls"
+ fi
+
+ echo 'CONFIGURED="y"' >> $MODULE_CONFIG
+ echo 'OPTS='\"$OPTS\" >> $MODULE_CONFIG
+fi
diff --git a/sql/mysql/DEPENDS b/sql/mysql/DEPENDS
new file mode 100644
index 0000000..cabe0eb
--- /dev/null
+++ b/sql/mysql/DEPENDS
@@ -0,0 +1,2 @@
+depends chkconfig
+depends perl
diff --git a/sql/mysql/DETAILS b/sql/mysql/DETAILS
new file mode 100644
index 0000000..8547b35
--- /dev/null
+++ b/sql/mysql/DETAILS
@@ -0,0 +1,18 @@
+ MODULE=mysql
+ VERSION=5.0.90
+ SOURCE=$MODULE-$VERSION.tar.gz
+ SOURCE_URL[0]=ftp://mirror.mcs.anl.gov/pub/mysql/Downloads/MySQL-5.0
+ SOURCE_URL[1]=ftp://ftp.heanet.ie/mirrors/www.mysql.com/Downloads/MySQL-5.0
+ SOURCE_URL[2]=http://mysql.mirrors.pair.com/Downloads/MySQL-5.0
+ SOURCE_URL[3]=http://mirrors.sunsite.dk/mysql/Downloads/MySQL-5.0
+ SOURCE_VFY=sha1:c637d0afed52de1e3326824afa954d1ffbcc7a2f
+ WEB_SITE=http://www.mysql.com
+ ENTERED=20011114
+ UPDATED=20100130
+ SHORT="A widely used and fast SQL database server"
+
+cat << EOF
+MySQL is a widely used and fast SQL database server. It is a client/
+server implementation that consists of a server daemon (mysqld) and
+many different client programs/libraries.
+EOF
diff --git a/sql/mysql/POST_INSTALL b/sql/mysql/POST_INSTALL
new file mode 100644
index 0000000..5c48681
--- /dev/null
+++ b/sql/mysql/POST_INSTALL
@@ -0,0 +1,14 @@
+if ! grep -q "\--without-server" $MODULE_CONFIG; then
+ mysql_install_db &&
+ chown -R mysql.mysql /var/lib/mysql/
+fi
+
+if mount | grep "/tmp" | grep -q tmpfs ; then
+ message ""
+ message "if /tmp is tmpfs and if mysql is being used against big"
+ message "tables (> 2G) there is a big possibility of data/index"
+ message "corruption, especially on myisamchk"
+ message ""
+ message "Consider mounting /tmp on a regular file system"
+ message ""
+fi
diff --git a/sql/mysql/init.d/mysqld b/sql/mysql/init.d/mysqld
new file mode 100755
index 0000000..160da8d
--- /dev/null
+++ b/sql/mysql/init.d/mysqld
@@ -0,0 +1,200 @@
+#!/bin/sh
+# Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB
+# This file is public domain and comes with NO WARRANTY of any kind
+
+# MySQL daemon start/stop script.
+
+# Usually this is put in /etc/init.d (at least on machines SYSV R4 based
+# systems) and linked to /etc/rc3.d/S99mysql and /etc/rc0.d/K01mysql.
+# When this is done the mysql server will be started when the machine is
+# started and shut down when the systems goes down.
+
+# Comments to support chkconfig on RedHat Linux
+# chkconfig: 2345 90 20
+# description: A very fast and reliable SQL database engine.
+
+# Comments to support LSB init script conventions
+### BEGIN INIT INFO
+# Provides: mysql
+# Required-Start: $local_fs $network $remote_fs
+# Required-Stop: $local_fs $network $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 2 3 4 5
+# Short-Description: start and stop MySQL
+# Description: MySQL is a very fast and reliable SQL database engine.
+### END INIT INFO
+
+# If you install MySQL on some other places than /usr, then you
+# have to do one of the following things for this script to work:
+#
+# - Run this script from within the MySQL installation directory
+# - Create a /etc/my.cnf file with the following information:
+# [mysqld]
+# basedir=<path-to-mysql-installation-directory>
+# - Add the above to any other configuration file (for example ~/.my.ini)
+# and copy my_print_defaults to /usr/bin
+# - Add the path to the mysql-installation-directory to the basedir variable
+# below.
+#
+# If you want to affect other MySQL variables, you should make your changes
+# in the /etc/my.cnf, ~/.my.cnf or other MySQL configuration files.
+
+basedir=
+
+# The following variables are only set for letting mysql.server find things.
+
+# Set some defaults
+datadir=/var/lib/mysql
+pid_file=
+if test -z "$basedir"
+then
+ basedir=/usr
+ bindir=/usr/bin
+else
+ bindir="$basedir/bin"
+fi
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:$basedir/bin
+export PATH
+
+if test -z "$pid_file"
+then
+ pid_file=$datadir/`/bin/hostname`.pid
+else
+ case "$pid_file" in
+ /* ) ;;
+ * ) pid_file="$datadir/$pid_file" ;;
+ esac
+fi
+
+mode=$1 # start or stop
+
+parse_arguments() {
+ for arg do
+ case "$arg" in
+ --basedir=*) basedir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
+ --datadir=*) datadir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
+ --pid-file=*) pid_file=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
+ esac
+ done
+}
+
+# Get arguments from the my.cnf file,
+# groups [mysqld] [mysql_server] and [mysql.server]
+if test -x ./bin/my_print_defaults
+then
+ print_defaults="./bin/my_print_defaults"
+elif test -x $bindir/my_print_defaults
+then
+ print_defaults="$bindir/my_print_defaults"
+elif test -x $bindir/mysql_print_defaults
+then
+ print_defaults="$bindir/mysql_print_defaults"
+else
+ # Try to find basedir in /etc/my.cnf
+ conf=/etc/my.cnf
+ print_defaults=
+ if test -r $conf
+ then
+ subpat='^[^=]*basedir[^=]*=\(.*\)$'
+ dirs=`sed -e "/$subpat/!d" -e 's//\1/' $conf`
+ for d in $dirs
+ do
+ d=`echo $d | sed -e 's/[ ]//g'`
+ if test -x "$d/bin/my_print_defaults"
+ then
+ print_defaults="$d/bin/my_print_defaults"
+ break
+ fi
+ if test -x "$d/bin/mysql_print_defaults"
+ then
+ print_defaults="$d/bin/mysql_print_defaults"
+ break
+ fi
+ done
+ fi
+
+ # Hope it's in the PATH ... but I doubt it
+ test -z "$print_defaults" && print_defaults="my_print_defaults"
+fi
+
+#
+# Test if someone changed datadir; In this case we should also read the
+# default arguments from this directory
+#
+
+extra_args=""
+if test "$datadir" != "/var/lib/mysql"
+then
+ extra_args="-e $datadir/my.cnf"
+fi
+
+parse_arguments `$print_defaults $extra_args mysqld mysql_server mysql.server`
+
+# Safeguard (relative paths, core dumps..)
+cd $basedir
+
+case "$mode" in
+ 'start')
+ # Start daemon
+
+ if test -x $bindir/mysqld_safe
+ then
+ # Give extra arguments to mysqld with the my.cnf file. This script may
+ # be overwritten at next upgrade.
+ $bindir/mysqld_safe --datadir=$datadir --pid-file=$pid_file &
+ # Make lock for RedHat / SuSE
+ if test -w /var/lock/subsys
+ then
+ touch /var/lock/subsys/mysql
+ fi
+ else
+ echo "Can't execute $bindir/mysqld_safe from dir $basedir"
+ fi
+ ;;
+
+ 'stop')
+ # Stop daemon. We use a signal here to avoid having to know the
+ # root password.
+ if test -s "$pid_file"
+ then
+ mysqld_pid=`cat $pid_file`
+ echo "Killing mysqld with pid $mysqld_pid"
+ kill $mysqld_pid
+ # mysqld should remove the pid_file when it exits, so wait for it.
+
+ sleep 1
+ while [ -s $pid_file -a "$flags" != aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ]
+ do
+ [ -z "$flags" ] && echo "Wait for mysqld to exit\c" || echo ".\c"
+ flags=a$flags
+ sleep 1
+ done
+ if [ -s $pid_file ]
+ then echo " gave up waiting!"
+ elif [ -n "$flags" ]
+ then echo " done"
+ fi
+ # delete lock for RedHat / SuSE
+ if test -f /var/lock/subsys/mysql
+ then
+ rm /var/lock/subsys/mysql
+ fi
+ else
+ echo "No mysqld pid file found. Looked for $pid_file."
+ fi
+ ;;
+
+ 'restart')
+ # Stop the service and regardless of whether it was
+ # running or not, start it again.
+ $0 stop
+ $0 start
+ ;;
+
+ *)
+ # usage
+ echo "Usage: $0 start|stop|restart"
+ exit 1
+ ;;
+esac
diff --git a/sql/mysql/services b/sql/mysql/services
new file mode 100644
index 0000000..85f9d1b
--- /dev/null
+++ b/sql/mysql/services
@@ -0,0 +1 @@
+mysql 3306/tcp # mysql server
diff --git a/zdeprecated/mysql/BUILD b/zdeprecated/mysql/BUILD
deleted file mode 100644
index a9bd692..0000000
--- a/zdeprecated/mysql/BUILD
+++ /dev/null
@@ -1,57 +0,0 @@
-(
-
- add_priv_user mysql:mysql &&
- devoke_installwatch &&
-
- if [ "`arch`" == "alpha" ]; then
- export CFLAGS="$CFLAGS -fPIC"
- export CXXFLAGS="$CXXFLAGS -fPIC"
- fi &&
-
- if [ "`arch`" == "x86_64" ]; then
- export CFLAGS="$CFLAGS -fPIC"
- export CXXFLAGS="$CXXFLAGS -fPIC"
- fi &&
-
- export CXX='gcc' &&
-
- ./configure --prefix=/usr \
- --disable-dependency-tracking \
- --without-bench \
- --without-debug \
- --without-readline \
- --without-libedit \
- --enable-thread-safe-client \
- --enable-assembler \
- --localstatedir=/var/lib/mysql \
- --infodir=/usr/share/info \
- --mandir=/usr/share/man \
- --with-pthread \
- $OPTS &&
- invoke_installwatch &&
-
- make pkglibdir=/usr/lib ||
- {
- MYSQL_EXIT=$?
- message ""
- message "Compilation of mysql failed."
- message ""
- message "If you are getting error about 'read_cr4/write_cr4' and/or 'set_in_cr4'"
- message "note that this is not a mysql bug."
- message ""
- message "To fix this please edit the include file that reports the errors and"
- message "encapsulate the 'set_in_cr4' function with '#ifdef __KERNEL__'/'#endif'."
- message ""
- exit $MYSQL_EXIT;
- }
- prepare_install &&
- mkdir -p /var/lib/mysql &&
- make pkglibdir=/usr/lib install &&
- rm -rf /usr/mysql-test &&
-
- if [ -x /etc/init.d/mysql.server ]; then
- rm -f /etc/init.d/mysql.server
- rm -f /etc/rc?.d/???mysql.server
- fi
-
-) > $C_FIFO 2>&1
diff --git a/zdeprecated/mysql/CONFIGURE b/zdeprecated/mysql/CONFIGURE
deleted file mode 100644
index a96ff3f..0000000
--- a/zdeprecated/mysql/CONFIGURE
+++ /dev/null
@@ -1,63 +0,0 @@
-if ! grep -q CONFIGURED $MODULE_CONFIG; then
-
- if query "Install client only? " n; then
- OPTS="$OPTS --without-server"
- else
- if query "Enable InnoDB Support? Needed by KDE4/Akonadi " n; then
- OPTS="$OPTS --with-innodb"
- else
- OPTS="$OPTS --without-innodb"
- fi
-
- if query "Enable BDB Support? " n; then
- OPTS="$OPTS --with-berkeley-db"
- else
- OPTS="$OPTS --without-berkeley-db"
- fi
-
- if query "Enable RAID Support? " n; then
- OPTS="$OPTS --with-raid"
- else
- OPTS="$OPTS --without-raid"
- fi
-
- if query "Include the Virtual IO support? " n; then
- OPTS="$OPTS --with-vio"
- else
- OPTS="$OPTS --without-vio"
- fi
-
- if query "Include the NDB Cluster table handler? " n; then
- OPTS="$OPTS --with-ndbcluster"
- else
- OPTS="$OPTS --without-ndbcluster"
- fi
-
- if query "Support tables with more than 4 G rows even on 32 bit platforms? " n; then
- OPTS="$OPTS --with-big-tables"
- else
- OPTS="$OPTS --without-big-tables"
- fi
- fi
-
- if query "Include the OpenSSL support? " n; then
- OPTS="$OPTS --with-openssl"
- fi
-
- if query "Build embedded server (libmysqld), needed by KDE4 ? " n; then
- OPTS="$OPTS --with-embedded-server"
- else
- OPTS="$OPTS --without-embedded-server"
- fi
-
- if query "Enable all character sets? " y; then
- OPTS="$OPTS --with-extra-charsets=all"
- elif query "Enable just complex character sets? " y; then
- OPTS="$OPTS --with-extra-charsets=complex"
- else
- OPTS="$OPTS --disable-nls"
- fi
-
- echo 'CONFIGURED="y"' >> $MODULE_CONFIG
- echo 'OPTS='\"$OPTS\" >> $MODULE_CONFIG
-fi
diff --git a/zdeprecated/mysql/DEPENDS b/zdeprecated/mysql/DEPENDS
deleted file mode 100644
index cabe0eb..0000000
--- a/zdeprecated/mysql/DEPENDS
+++ /dev/null
@@ -1,2 +0,0 @@
-depends chkconfig
-depends perl
diff --git a/zdeprecated/mysql/DETAILS b/zdeprecated/mysql/DETAILS
deleted file mode 100644
index 8547b35..0000000
--- a/zdeprecated/mysql/DETAILS
+++ /dev/null
@@ -1,18 +0,0 @@
- MODULE=mysql
- VERSION=5.0.90
- SOURCE=$MODULE-$VERSION.tar.gz
- SOURCE_URL[0]=ftp://mirror.mcs.anl.gov/pub/mysql/Downloads/MySQL-5.0
- SOURCE_URL[1]=ftp://ftp.heanet.ie/mirrors/www.mysql.com/Downloads/MySQL-5.0
- SOURCE_URL[2]=http://mysql.mirrors.pair.com/Downloads/MySQL-5.0
- SOURCE_URL[3]=http://mirrors.sunsite.dk/mysql/Downloads/MySQL-5.0
- SOURCE_VFY=sha1:c637d0afed52de1e3326824afa954d1ffbcc7a2f
- WEB_SITE=http://www.mysql.com
- ENTERED=20011114
- UPDATED=20100130
- SHORT="A widely used and fast SQL database server"
-
-cat << EOF
-MySQL is a widely used and fast SQL database server. It is a client/
-server implementation that consists of a server daemon (mysqld) and
-many different client programs/libraries.
-EOF
diff --git a/zdeprecated/mysql/POST_INSTALL b/zdeprecated/mysql/POST_INSTALL
deleted file mode 100644
index 5c48681..0000000
--- a/zdeprecated/mysql/POST_INSTALL
+++ /dev/null
@@ -1,14 +0,0 @@
-if ! grep -q "\--without-server" $MODULE_CONFIG; then
- mysql_install_db &&
- chown -R mysql.mysql /var/lib/mysql/
-fi
-
-if mount | grep "/tmp" | grep -q tmpfs ; then
- message ""
- message "if /tmp is tmpfs and if mysql is being used against big"
- message "tables (> 2G) there is a big possibility of data/index"
- message "corruption, especially on myisamchk"
- message ""
- message "Consider mounting /tmp on a regular file system"
- message ""
-fi
diff --git a/zdeprecated/mysql/init.d/mysqld b/zdeprecated/mysql/init.d/mysqld
deleted file mode 100755
index 160da8d..0000000
--- a/zdeprecated/mysql/init.d/mysqld
+++ /dev/null
@@ -1,200 +0,0 @@
-#!/bin/sh
-# Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB
-# This file is public domain and comes with NO WARRANTY of any kind
-
-# MySQL daemon start/stop script.
-
-# Usually this is put in /etc/init.d (at least on machines SYSV R4 based
-# systems) and linked to /etc/rc3.d/S99mysql and /etc/rc0.d/K01mysql.
-# When this is done the mysql server will be started when the machine is
-# started and shut down when the systems goes down.
-
-# Comments to support chkconfig on RedHat Linux
-# chkconfig: 2345 90 20
-# description: A very fast and reliable SQL database engine.
-
-# Comments to support LSB init script conventions
-### BEGIN INIT INFO
-# Provides: mysql
-# Required-Start: $local_fs $network $remote_fs
-# Required-Stop: $local_fs $network $remote_fs
-# Default-Start: 2 3 4 5
-# Default-Stop: 2 3 4 5
-# Short-Description: start and stop MySQL
-# Description: MySQL is a very fast and reliable SQL database engine.
-### END INIT INFO
-
-# If you install MySQL on some other places than /usr, then you
-# have to do one of the following things for this script to work:
-#
-# - Run this script from within the MySQL installation directory
-# - Create a /etc/my.cnf file with the following information:
-# [mysqld]
-# basedir=<path-to-mysql-installation-directory>
-# - Add the above to any other configuration file (for example ~/.my.ini)
-# and copy my_print_defaults to /usr/bin
-# - Add the path to the mysql-installation-directory to the basedir variable
-# below.
-#
-# If you want to affect other MySQL variables, you should make your changes
-# in the /etc/my.cnf, ~/.my.cnf or other MySQL configuration files.
-
-basedir=
-
-# The following variables are only set for letting mysql.server find things.
-
-# Set some defaults
-datadir=/var/lib/mysql
-pid_file=
-if test -z "$basedir"
-then
- basedir=/usr
- bindir=/usr/bin
-else
- bindir="$basedir/bin"
-fi
-
-PATH=/sbin:/usr/sbin:/bin:/usr/bin:$basedir/bin
-export PATH
-
-if test -z "$pid_file"
-then
- pid_file=$datadir/`/bin/hostname`.pid
-else
- case "$pid_file" in
- /* ) ;;
- * ) pid_file="$datadir/$pid_file" ;;
- esac
-fi
-
-mode=$1 # start or stop
-
-parse_arguments() {
- for arg do
- case "$arg" in
- --basedir=*) basedir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
- --datadir=*) datadir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
- --pid-file=*) pid_file=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
- esac
- done
-}
-
-# Get arguments from the my.cnf file,
-# groups [mysqld] [mysql_server] and [mysql.server]
-if test -x ./bin/my_print_defaults
-then
- print_defaults="./bin/my_print_defaults"
-elif test -x $bindir/my_print_defaults
-then
- print_defaults="$bindir/my_print_defaults"
-elif test -x $bindir/mysql_print_defaults
-then
- print_defaults="$bindir/mysql_print_defaults"
-else
- # Try to find basedir in /etc/my.cnf
- conf=/etc/my.cnf
- print_defaults=
- if test -r $conf
- then
- subpat='^[^=]*basedir[^=]*=\(.*\)$'
- dirs=`sed -e "/$subpat/!d" -e 's//\1/' $conf`
- for d in $dirs
- do
- d=`echo $d | sed -e 's/[ ]//g'`
- if test -x "$d/bin/my_print_defaults"
- then
- print_defaults="$d/bin/my_print_defaults"
- break
- fi
- if test -x "$d/bin/mysql_print_defaults"
- then
- print_defaults="$d/bin/mysql_print_defaults"
- break
- fi
- done
- fi
-
- # Hope it's in the PATH ... but I doubt it
- test -z "$print_defaults" && print_defaults="my_print_defaults"
-fi
-
-#
-# Test if someone changed datadir; In this case we should also read the
-# default arguments from this directory
-#
-
-extra_args=""
-if test "$datadir" != "/var/lib/mysql"
-then
- extra_args="-e $datadir/my.cnf"
-fi
-
-parse_arguments `$print_defaults $extra_args mysqld mysql_server mysql.server`
-
-# Safeguard (relative paths, core dumps..)
-cd $basedir
-
-case "$mode" in
- 'start')
- # Start daemon
-
- if test -x $bindir/mysqld_safe
- then
- # Give extra arguments to mysqld with the my.cnf file. This script may
- # be overwritten at next upgrade.
- $bindir/mysqld_safe --datadir=$datadir --pid-file=$pid_file &
- # Make lock for RedHat / SuSE
- if test -w /var/lock/subsys
- then
- touch /var/lock/subsys/mysql
- fi
- else
- echo "Can't execute $bindir/mysqld_safe from dir $basedir"
- fi
- ;;
-
- 'stop')
- # Stop daemon. We use a signal here to avoid having to know the
- # root password.
- if test -s "$pid_file"
- then
- mysqld_pid=`cat $pid_file`
- echo "Killing mysqld with pid $mysqld_pid"
- kill $mysqld_pid
- # mysqld should remove the pid_file when it exits, so wait for it.
-
- sleep 1
- while [ -s $pid_file -a "$flags" != aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ]
- do
- [ -z "$flags" ] && echo "Wait for mysqld to exit\c" || echo ".\c"
- flags=a$flags
- sleep 1
- done
- if [ -s $pid_file ]
- then echo " gave up waiting!"
- elif [ -n "$flags" ]
- then echo " done"
- fi
- # delete lock for RedHat / SuSE
- if test -f /var/lock/subsys/mysql
- then
- rm /var/lock/subsys/mysql
- fi
- else
- echo "No mysqld pid file found. Looked for $pid_file."
- fi
- ;;
-
- 'restart')
- # Stop the service and regardless of whether it was
- # running or not, start it again.
- $0 stop
- $0 start
- ;;
-
- *)
- # usage
- echo "Usage: $0 start|stop|restart"
- exit 1
- ;;
-esac
diff --git a/zdeprecated/mysql/services b/zdeprecated/mysql/services
deleted file mode 100644
index 85f9d1b..0000000
--- a/zdeprecated/mysql/services
+++ /dev/null
@@ -1 +0,0 @@
-mysql 3306/tcp # mysql server
More information about the Lunar-commits
mailing list