]> git.pld-linux.org Git - packages/mysql.git/commitdiff
- fixed force-reload, added try-restart auto/ti/mysql-5_1_29-2
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 4 Nov 2008 19:18:58 +0000 (19:18 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mysql-ndb-cpc.init -> 1.4
    mysql-ndb-mgm.init -> 1.4
    mysql-ndb.init -> 1.4

mysql-ndb-cpc.init
mysql-ndb-mgm.init
mysql-ndb.init

index 9d5d971e69eb8dce574ac4c0c60825e61be721e1..ad159b36cd10dbc6517b3cbacc7d58933e485d30 100644 (file)
@@ -51,6 +51,16 @@ stop() {
        fi
 }
 
+condrestart() {
+       if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
+               stop
+               start
+       else
+               msg_not_running "mysql ndb_cpcd"
+               RETVAL=$1
+       fi
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -60,16 +70,22 @@ case "$1" in
   stop)
        stop
        ;;
-  restart|force-reload)
+  restart)
        stop
        start
        ;;
+  try-restart)
+       condrestart 0
+       ;;
+  force-reload)
+       condrestart 7
+       ;;
   status)
        status ndb_cpcd
        exit $?
        ;;
   *)
-       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
        exit 3
 esac
 
index f4008f437946d318a94dc9418534b5246ff4fed4..0f9681c224602187bb9812447dbc459cd95befda 100644 (file)
@@ -51,6 +51,16 @@ stop() {
        fi
 }
 
+condrestart() {
+       if [ -f /var/lock/subsys/mysql-ndb-mgm ]; then
+               stop
+               start
+       else
+               msg_not_running "mysql ndb_mgmd"
+               RETVAL=$1
+       fi
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -60,16 +70,22 @@ case "$1" in
   stop)
        stop
        ;;
-  restart|force-reload)
+  restart)
        stop
        start
        ;;
+  try-restart)
+       condrestart 0
+       ;;
+  force-reload)
+       condrestart 7
+       ;;
   status)
        status ndb_mgmd
        exit $?
        ;;
   *)
-       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
        exit 3
 esac
 
index 82f1bc09afa7f1cf331bc35a3b16ab0cd42545b4..0374a482d73b2d51dd356072e398ea17ed4b65ad 100644 (file)
@@ -51,6 +51,16 @@ stop() {
        fi
 }
 
+condrestart() {
+       if [ -f /var/lock/subsys/mysql-ndb ]; then
+               stop
+               start
+       else
+               msg_not_running "mysql ndbd"
+               RETVAL=$1
+       fi
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -60,16 +70,22 @@ case "$1" in
   stop)
        stop
        ;;
-  restart|force-reload)
+  restart)
        stop
        start
        ;;
+  try-restart)
+       condrestart 0
+       ;;
+  force-reload)
+       condrestart 7
+       ;;
   status)
        status ndbd
        exit $?
        ;;
   *)
-       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
        exit 3
 esac
 
This page took 0.217652 seconds and 4 git commands to generate.