]> git.pld-linux.org Git - packages/mysql.git/commitdiff
- show in status also info about processes not registered in /etc/mysql/clusters...
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 14 Aug 2008 08:58:42 +0000 (08:58 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mysql.init -> 1.124

mysql.init

index 531a1726a6511616346c0f2c0b167d7d45281847..a0f2a23e993107821d22b57a3fe6f5515ef10897 100644 (file)
@@ -525,6 +525,7 @@ case "$action" in
                mysqlstatus "$mysqldir"
                if [ "$MYSQL_STATUS" = "running" ]; then
                        show "MySQL cluster %s, PID %s" "$mysqldir" "$MYSQL_PID"
+                       pids="$pids/$MYSQL_PID/"
                        progress "$MYSQL_STATUS"
                else
                        show "MySQL cluster %s" "$mysqldir"
@@ -532,7 +533,30 @@ case "$action" in
                fi
                echo
        done
-       exit $?
+
+       for pid in $(/sbin/pidof mysqld); do
+               if [[ $pids != */$pid/* ]]; then
+                       running="$running $pid"
+               fi
+       done
+       if [ "$running" ]; then
+               nls "Warning: MySQL Daemon processes not under clusters.conf control:"
+               # see if we can display their status
+               for pid in $running; do
+                       datadir=$(cat /proc/14165/cmdline | tr '\0' '\n' | fgrep -- --datadir=)
+                       datadir=${datadir#--datadir=} # strip --datadir
+                       mysqldir=${datadir%/mysqldb/db} # strip /mysqldb/db
+                       mysqlstatus "$mysqldir"
+                       if [ "$MYSQL_STATUS" = "running" ]; then
+                               show "MySQL cluster %s, PID %s" "$mysqldir" "$pid"
+                               progress "$MYSQL_STATUS"
+                       else
+                               show "MySQL cluster %s" "$mysqldir"
+                               progress "$MYSQL_STATUS" "$CFAIL"
+                       fi
+                       echo
+               done
+       fi
        ;;
   restart|force-reload)
        stop
@@ -559,5 +583,3 @@ case "$action" in
 esac
 
 exit $RETVAL
-
-# vi: shiftwidth=4 tabstop=4
This page took 0.041023 seconds and 4 git commands to generate.