SOURCES: mysql.init - use functions for start and stop to speedup ...
glen
glen at pld-linux.org
Thu Oct 12 23:32:43 CEST 2006
Author: glen Date: Thu Oct 12 21:32:43 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use functions for start and stop to speedup restart
---- Files affected:
SOURCES:
mysql.init (1.101 -> 1.102)
---- Diffs:
================================================================
Index: SOURCES/mysql.init
diff -u SOURCES/mysql.init:1.101 SOURCES/mysql.init:1.102
--- SOURCES/mysql.init:1.101 Thu Oct 12 23:30:59 2006
+++ SOURCES/mysql.init Thu Oct 12 23:32:38 2006
@@ -825,9 +825,7 @@
# End of useful functions.
#
-RETVAL=0
-case "$action" in
- start)
+start() {
if [ ! -f $MYSQL_ERRLOG ]; then
touch $MYSQL_ERRLOG
fi
@@ -843,8 +841,9 @@
fi
done
mysqlsubsys
- ;;
- stop)
+}
+
+stop() {
for mysqldir in $DB_CLUSTERS; do
mysqlstatus "$mysqldir" stop
if [ "$MYSQL_STATUS" = "not running" ]; then
@@ -854,6 +853,15 @@
fi
done
mysqlsubsys
+}
+
+RETVAL=0
+case "$action" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
status)
for mysqldir in $DB_CLUSTERS; do
@@ -870,9 +878,8 @@
exit $?
;;
restart|force-reload)
- $0 stop $DB_CLUSTERS
- $0 start $DB_CLUSTERS
- exit $?
+ stop
+ start
;;
init)
for mysqldir in $DB_CLUSTERS; do
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/mysql.init?r1=1.101&r2=1.102&f=u
More information about the pld-cvs-commit
mailing list