From: Elan Ruusamäe Date: Thu, 8 Apr 2010 20:16:00 +0000 (+0000) Subject: - sync msg_usage order and add all actions to list X-Git-Tag: auto/th/mysql-5_1_45-2~3 X-Git-Url: https://git.pld-linux.org/?a=commitdiff_plain;h=33cdd78d628b19e9f940b7d45257df23aa6d1f26;p=packages%2Fmysql.git - sync msg_usage order and add all actions to list Changed files: mysql.init -> 1.140 --- diff --git a/mysql.init b/mysql.init index 164ef14..231ac51 100644 --- a/mysql.init +++ b/mysql.init @@ -551,10 +551,10 @@ condrestart() { RETVAL=0 case "$action" in start) - start + start ;; stop) - stop + stop ;; restart) stop @@ -566,6 +566,21 @@ case "$action" in 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) for mysqldir in $DB_CLUSTERS; do mysqlstatus "$mysqldir" @@ -616,23 +631,8 @@ case "$action" in done fi ;; - 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 - ;; *) - msg_usage "$0 {start|stop|init|restart|try-restart|force-reload|status}" + msg_usage "$0 {start|stop|restart|try-restart|force-reload|init|flush-logs|status}" exit 3 esac