Author: glen                         Date: Thu Aug 14 08:58:48 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- show in status also info about processes not registered in 
/etc/mysql/clusters.conf

---- Files affected:
SOURCES:
   mysql.init (1.123 -> 1.124) 

---- Diffs:

================================================================
Index: SOURCES/mysql.init
diff -u SOURCES/mysql.init:1.123 SOURCES/mysql.init:1.124
--- SOURCES/mysql.init:1.123    Fri Mar 14 16:24:58 2008
+++ SOURCES/mysql.init  Thu Aug 14 10:58:42 2008
@@ -525,6 +525,7 @@
                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 @@
                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 @@
 esac
 
 exit $RETVAL
-
-# vi: shiftwidth=4 tabstop=4
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/mysql.init?r1=1.123&r2=1.124&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to