]> git.pld-linux.org Git - packages/mysql.git/blobdiff - mysql.init
- updated to 5.5.32
[packages/mysql.git] / mysql.init
index f5cc30fea348d6dac77846d6547f13dca4e0d3e1..ab323549a136fd1178b1065d07c167f4b0b0e657 100755 (executable)
@@ -550,7 +550,11 @@ END_OF_MSG
        else
                fail
                cat << END_OF_MSG
-Installation of grant tables FAILED!
+ERROR:
+ERROR:
+ERROR: Installation of grant tables FAILED!
+ERROR:
+ERROR:
 
 The initialization SQL script was preserved at $MYSQL_DATA_DIR/mysql-init.sql
 
@@ -622,40 +626,8 @@ condrestart() {
        start
 }
 
-RETVAL=0
-case "$action" in
-  start)
-       start
-       ;;
-  stop)
-       stop
-       ;;
-  restart)
-       stop
-       start
-       ;;
-  try-restart)
-       condrestart 0
-       ;;
-  force-reload)
-       condrestart 7
-       ;;
-  init)
-       for mysqldir in $DB_CLUSTERS; do
-               mysqlinit "$mysqldir"
-       done
-       exit $?
-       ;;
-  flush-logs)
-       for mysqldir in $DB_CLUSTERS; do
-           mysqlgetconfig "$mysqldir"
-               # just if mysqld is really running
-               if /usr/bin/mysqladmin --defaults-file="$MYSQL_CONFIG" --socket="$MYSQL_SOCKET" ping >/dev/null 2>&1; then
-                       /usr/bin/mysqladmin --defaults-file="$MYSQL_CONFIG" --socket="$MYSQL_SOCKET" flush-logs
-               fi
-       done
-       ;;
-  status)
+status() {
+       local mysqldir addr port socket pid pids running datadir 
        RETVAL=3
        for mysqldir in $DB_CLUSTERS; do
                mysqlstatus "$mysqldir"
@@ -712,6 +684,43 @@ case "$action" in
                        echo
                done
        fi
+}
+
+RETVAL=0
+case "$action" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart)
+       stop
+       start
+       ;;
+  try-restart)
+       condrestart 0
+       ;;
+  force-reload)
+       condrestart 7
+       ;;
+  init)
+       for mysqldir in $DB_CLUSTERS; do
+               mysqlinit "$mysqldir"
+       done
+       exit $?
+       ;;
+  flush-logs)
+       for mysqldir in $DB_CLUSTERS; do
+           mysqlgetconfig "$mysqldir"
+               # just if mysqld is really running
+               if /usr/bin/mysqladmin --defaults-file="$MYSQL_CONFIG" --socket="$MYSQL_SOCKET" ping >/dev/null 2>&1; then
+                       /usr/bin/mysqladmin --defaults-file="$MYSQL_CONFIG" --socket="$MYSQL_SOCKET" flush-logs
+               fi
+       done
+       ;;
+  status)
+       status
        ;;
   *)
        msg_usage "$0 {start|stop|restart|try-restart|force-reload|init|flush-logs|status}"
This page took 0.044617 seconds and 4 git commands to generate.